次の方法で共有


Android 用 .NET エラー XA1030

Example messages (メッセージの例)

The 'RunAOTCompilation' MSBuild property is only supported when trimming is enabled. Edit the project file in a text editor to set 'PublishTrimmed' to 'true' for this build configuration.

解決策

使用する代わりに、次の手順を実行します。

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
  <RunAOTCompilation>true</RunAOTCompilation>
  <!-- Either of these disable the linker/trimmer -->
  <PublishTrimmed>false</PublishTrimmed>
  <AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>

代わりに、 $(PublishTrimmed)$(AndroidLinkMode) の既定値を使用します。

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
  <RunAOTCompilation>true</RunAOTCompilation>
</PropertyGroup>

また、XA0119で説明されているように、Debug構成では$(RunAOTCompilation)を使用しないでください。