[MonoGame][3.8.1]Android Release Buildで「Assembly 'mscorlib' not found」と表示され動作しないときの対処

Android用のRelease Buildで、以下のエラーが実行時に表示されアプリが起動しないときの対処法です。

09-19 13:08:04.974 10693 10693 W monodroid-assembly: Assembly 'mscorlib' (hash 0xe99c30c1484d7f4f) not found
09-19 13:08:04.974 10693 10693 W monodroid-assembly: open_from_bundles: failed to load assembly mscorlib
09-19 13:08:04.991 10693 10693 D AndroidRuntime: Shutting down VM
09-19 13:08:04.991 10693 10693 E AndroidRuntime: FATAL EXCEPTION: main
09-19 13:08:04.991 10693 10693 E AndroidRuntime: Process: com.milktea.garakuta.monoattack, PID: 10693
09-19 13:08:04.991 10693 10693 E AndroidRuntime: 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.ListReader`1[[System.Char, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] (Microsoft.Xna.Framework.Content.ListReader`1[[System.Char, mscorlib]])

プロジェクトのプロパティを開き、以下を設定します。

  全般
  コード最適化 : 無効

 Android
  AOT :無効
  トリミングを有効にする:無効

VS2022 17.3.3では、トリミングを有効にするを無効にできませんでした。
VS2022 17.3.4に更新して、この設定を行えました。

0 件のコメント :

コメントを投稿