Debugging No compatible code running

I get a Microsoft.Xna.Framework.Content.ContentLoadException: 'The content file was not found.' Exception. But I get a No compatible code running too… See the screenshot below. This is an Android App. I tried to disable Enable just my code with no success in showing the source code where the exception happens. How can I locate the source code where the Exception happens?

Also since this is a ``ContentLoadException`… What is necessary to trigger mgcb files / content to build? This is what I believe should make it work, is this correct?:
Set mgcb to MonoGameContent reference in properties. Add the MonoGameContentBuilder Task. What about if I have shared content in a net standard library and a reference to the net standard library? Do I need to have a link from my Android project to the net standard libs mgcb (The MonoGameContentBuilder Task is already present by default in the Android project)? Or will the referenced net standard libs mgcb get build if I have the MonoGameContentBuilder Task in the net standard lib and set the mgcb to MonoGameContentReference, even if I would only have a reference from the Android project to the net standard library but not a MonoGameContentBuilder Task in the Android project itself?

I get this all the time. It is usually due to variations in the file name. Like I type Frames when the file name is frames. Windows doesn’t care about the difference but the file names in Android are case sensitive.

I think that because the exception is outside of the scope of MonoGame and .NET, in a native library, is why you are getting that error. I usually have to set a breakpoint at the start of the LoadContent method and step through until I find out which file is breaking it. Also, come to think of it. I need to use / instead of \ when dealing with sub-folders.

1 Like

In this case it was a file with lower case filename and I had used uppercase for the first letter in the LoadContent method.