[problem] Microsoft.Xna.Framework.Game.Content.**get** returned null.

Hi, sorry if this is a silly question. I’m a newbie…

I just tried to run my game after installing monogame extended and I’m getting a weird error, I feel like this is something simple and I’m just not understanding it. I’ve looked for other solutions to this but I can’t find anything atm.

This is whats happening when I’m trying to run my game:

This is my debug output:

'PrototypeRPG.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PrototypeRPG.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\Lee\source\repos\PrototypeRPG\PrototypeRPG\bin\Windows\x86\Debug\PrototypeRPG.exe'. Symbols loaded.
'PrototypeRPG.exe' (CLR v4.0.30319: PrototypeRPG.exe): Loaded 'C:\Users\Lee\source\repos\PrototypeRPG\PrototypeRPG\bin\Windows\x86\Debug\MonoGame.Framework.dll'. Module was built without symbols.
Microsoft.Xna.Framework.Game.Content.**get** returned null.

'PrototypeRPG.exe' (CLR v4.0.30319: PrototypeRPG.exe): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[19208] PrototypeRPG.exe' has exited with code -1 (0xffffffff).

Sorry if this is a stupid question but I’m really lost on whats happening here

Someone please retag this as extended so the right people notice it?

Also, Welcome to the Forums @canniescot, Happy Coding!

1 Like

I’m afraid I don’t use Extended so can’t give oyu an exact answer, but here’s a thread that has a couple possible solutions in it.

Content gets created in the constructor of the Game class so either that is never being called or it’s being created and destroyed. Seems like it happens more often with Extended so hopefully someone can shed a little more light on it.

** UPDATE **

Okay so I seem to have solved this by installing an older version of monogame extended (v1.0.617). My issue was when I was installing monogame extended latest release it would fix the issue of not having a default importer for .tmx and .tsx files in the content pipeline but then it would create an issue where my application wouldn’t even run because of some error with the content being null or something…

With the older version of monogame extended installed I can import .tmx files and my application will still run. I can’t import .tsx files because the importer wasn’t added until a later version but I can work around this in Tiled by embedding the tilesheet into the tilemap. Given that all I wanted monogame extended for was to import Tiled tilemaps, this fixes my problem

1 Like