メッセージの例
warning XA1040: The NativeAOT runtime on Android is an experimental feature and not yet suitable for production use. File issues at: https://github.com/dotnet/android/issues
問題点
NativeAOT は、Android 用 .NET の実験用ランタイム オプションです。
$(PublishAot)=trueを使用して NativeAOT を有効にすると、この警告が出力され、NativeAOT がまだ運用環境での使用に適していないことを示します。
サポートされているランタイムは次のとおりです。
- CoreCLR (既定)
- MonoVMは
$(UseMonoRuntime)=true経由で使用します。
ソリューション
この警告を無音にするには、次のいずれかを実行します。
サポートされているランタイムを使用するには、プロジェクト ファイルから
$(PublishAot)=trueを削除します。$(EnablePreviewFeatures)をプロジェクト ファイルでtrueに設定して、NativeAOT の実験的な性質を確認します。