Edit

.NET for Android error XA1044

Example messages

error XA1044: The MSBuild property 'RunAOTCompilation' is not compatible with the CoreCLR runtime. The build cannot continue while this property is enabled. Either remove the property or guard it with a condition: Condition="'$(UseMonoRuntime)' == 'true'"

The condition suggested by this message is only appropriate for targets that support Mono. In .NET 11, $(UseMonoRuntime)=true is rejected with NETSDK1242; remove the Mono-only property instead.

Issue

This error indicates that a Mono-specific MSBuild property is set in the project file, but the project is configured to use a non-Mono runtime, such as CoreCLR or NativeAOT. The build resets the property to false so it is not passed to non-Mono build steps, then stops with XA1044. This is not a warning or a silent no-op.

Properties that trigger this error include:

  • RunAOTCompilation — Enables Mono AOT compilation.
  • EnableLLVM — Enables LLVM for the Mono AOT compiler.

Solution

Remove the Mono-specific property from your project file or Directory.Build.props. Retain it only in project files or conditions that apply exclusively to supported .NET 10-and-earlier Mono targets.

ReadyToRun and NativeAOT are separate compilation models. They are not one-to-one replacements for Mono AOT settings.