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.
Solution
Instead of using:
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<RunAOTCompilation>true</RunAOTCompilation>
<!-- Either of these disable the linker/trimmer -->
<PublishTrimmed>false</PublishTrimmed>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
Use the default value for $(PublishTrimmed) and $(AndroidLinkMode)
instead:
.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, and IoT.