Android Release build can't find ContentTypeReader

When running a debug build the app runs fine in the emulator but when I switch to a release build, in order to check how it runs on a physical device, it crashes both on the emulator and on the physical device. here is the error:

android.runtime.JavaProxyThrowable: Microsoft.Xna.Framework.Content.ContentLoadException: Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: Microsoft.Xna.Framework.Content.ListReader1[[System.Char, System.Private.CoreLib, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] (Microsoft.Xna.Framework.Content.ListReader1[[System.Char, mscorlib]])
at Microsoft.Xna.Framework.MonoGameAndroidGameView.UpdateAndRenderFrame()
at Microsoft.Xna.Framework.MonoGameAndroidGameView.processStateRunning(CancellationToken token)
at Microsoft.Xna.Framework.MonoGameAndroidGameView.RunIteration(CancellationToken token)
at Microsoft.Xna.Framework.MonoGameAndroidGameView.<>c__DisplayClass62_0.b__0(Object s)
at Android.App.SyncContext.<>c__DisplayClass3_0.b__0()
at Java.Lang.Thread.RunnableImplementor.Run()
at Java.Lang.IRunnableInvoker.n_Run(IntPtr , IntPtr )
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V , IntPtr , IntPtr )
at Method)
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)

This is very similar to this topic ([SOLVED] ContentLoadException in version, however the difference is I am loading a PNG which it tries to use the Texture importer. I tried the FBX importer, because why not :slight_smile: but that won’t even compile then.

I am using monogame

thanks for any advice

The trimmer is removing mscorlib because it is used via reflection. Solution:

That worked perfectly, thanks

1 Like