Bug 9269 - MonoGame Could not load image asset!
Summary: MonoGame Could not load image asset!
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: ASP.Net ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-01-04 12:15 UTC by Markus
Modified: 2015-09-17 09:33 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Markus 2013-01-04 12:15:06 UTC
When building a game for Linux on Ubuntu I type:

		protected override void LoadContent ()
			// Create a new SpriteBatch, which can be used to draw textures.
			spriteBatch = new SpriteBatch (GraphicsDevice);

			//TODO: use this.Content to load your game content here
			myRectangle = new Rectangle(50, 50, 50, 50);
			myTexture = Content.Load<Texture2D>("image");

And get:
Microsoft.Xna.Framework.Content.ContentLoadException has been thrown

Stack Trace:
Microsoft.Xna.Framework.Content.ContentLoadException: Could not load image asset!
  at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[Texture2D] (System.String assetName, System.Action`1 recordDisposableObject) [0x00000] in <filename unknown>:0
  at Microsoft.Xna.Framework.Content.ContentManager.Load[Texture2D] (System.String assetName) [0x00000] in <filename unknown>:0
  at linTest1.Game1.LoadContent () [0x00024] in /home/sh4ggy/Documents/MonoGame/linTest1/linTest1/Game1.cs:57
  at Microsoft.Xna.Framework.Game.Initialize () [0x00000] in <filename unknown>:0
  at linTest1.Game1.Initialize () [0x00000] in /home/sh4ggy/Documents/MonoGame/linTest1/linTest1/Game1.cs:42
  at Microsoft.Xna.Framework.Game.Run (GameRunBehavior runBehavior) [0x00000] in <filename unknown>:0
  at Microsoft.Xna.Framework.Game.Run () [0x00000] in <filename unknown>:0
  at linTest1.Program.Main () [0x0000a] in /home/sh4ggy/Documents/MonoGame/linTest1/linTest1/Program.cs:21

I have tryed on two different linux versions, reinstalled numerous times and googled a solution.
Comment 1 Markus 2013-01-04 12:16:30 UTC
I can add that I have the image.jpeg added in my Content folder
Comment 2 Matt Ward 2015-09-17 09:33:39 UTC
Can you file a bug on the MonoGame issues if this is still a problem?