-
Notifications
You must be signed in to change notification settings - Fork 555
[coreclr] projects with UseMonoRuntime=false
successfully build
#9754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a step towards Android projects using `UseMonoRuntime=false` successfully: 1. Create new packs such as `Microsoft.Android.Runtime.CoreCLR.[api].[rid]` 2. Ensure a project *builds* with `UseMonoRuntime=false` in both `Debug` and `Release` configurations. 3. The project will not be able to run successfully yet. (Significant work required for no. 3)
This comment was marked as outdated.
This comment was marked as outdated.
Path.Combine (XABuildPaths.BuildOutputDirectory, "nuget-unsigned"), | ||
} | ||
}; | ||
proj.SetProperty ("UseMonoRuntime", "false"); // Enables CoreCLR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this one bool property going to be enough? As we will have MonoVM, CoreCLR and NativeAOT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is here:
Lines 29 to 31 in 44c5c30
<_AndroidRuntime Condition=" '$(PublishAot)' == 'true' and '$(UseMonoRuntime)' != 'true' ">NativeAOT</_AndroidRuntime> | |
<_AndroidRuntime Condition=" '$(PublishAot)' != 'true' and '$(UseMonoRuntime)' != 'true' ">CoreCLR</_AndroidRuntime> | |
<_AndroidRuntime Condition=" '$(_AndroidRuntime)' == '' ">MonoVM</_AndroidRuntime> |
But yeah, I think they need to invent a new property. $(PublishAot)
and $(UseMonoRuntime)
are what iOS uses currently.
<Import Project="Microsoft.Android.Sdk.NativeAOT.targets" Condition=" '$(_AndroidRuntime)' == 'NativeAOT' And '$(DesignTimeBuild)' != 'true' " /> | ||
<Import Project="Microsoft.Android.Sdk.CoreCLR.targets" Condition=" '$(_AndroidRuntime)' == 'CoreCLR' " /> | ||
<Import Project="Microsoft.Android.Sdk.NativeAOT.targets" Condition=" '$(_AndroidRuntime)' == 'NativeAOT' " /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why was there: '$(DesignTimeBuild)' != 'true'
before ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was accidental in an unrelated change: 9ed1469
When I saw it, felt like it would be wrong because it would prevent NativeAOT packs from being used in a design-time build.
This is a step towards Android projects using
UseMonoRuntime=false
successfully:Create new packs such as
Microsoft.Android.Runtime.CoreCLR.[api].[rid]
Ensure a project builds with
UseMonoRuntime=false
in bothDebug
andRelease
configurations.The project will not be able to run successfully yet.
(Significant work required for no. 3)