Support for $(TargetFrameworks)
per $(RuntimeIdentifier)
(RID)
#37830
Labels
Milestone
$(TargetFrameworks)
per $(RuntimeIdentifier)
(RID)
#37830
Is your feature request related to a problem? Please describe.
Currently, Android projects build 4 architectures by default:
We have custom MSBuild logic that "combines" the 4 architectures and emits a final Android package at the end. To make this work, we run an
<MSBuild />
task per-RID that runs a subset of thedotnet publish
MSBuild targets for trimming, Mono AOT compilation, etc.It would be nice if the .NET SDK had built-in support for this, as it could be useful for several scenarios:
Describe the solution you'd like
One solution, would be to make a new
TargetFramework
syntax, such as:The .NET SDK would handle running inner/outer builds with the
<MSBuild/>
task.PROs
This would enable the Android & macOS/MacCatalyst workloads to rely on logic in the .NET SDK instead of inventing our own.
This also would be useful, in that new
#if
directives could exist like:This would be useful on both macOS and Android.
CONs
We now run the C# compiler N times. Build performance concerns?
MAUI projects will have a combinatorial explosion of
$(TargetFrameworks)
.Additional context
This is related to:
The text was updated successfully, but these errors were encountered: