Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] add %(Platform) to any global @(Using)
Context: dotnet/maui#3018 (review) In order for the .NET MAUI workload to properly implement implicit global usings: 1. The .NET MAUI workload will add many `@(Using)` entries that conflict with each platform's APIs. 2. We need *something* to identify `@(Using)` is for a specific platform, so we can use a new `%(Platform)` metadata for this. 3. Late in .NET MAUI's MSBuild targets, we can do: <ItemGroup Condition=" '$(UseMaui)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') "> <Using Remove="@(Using->HasMetadata('Platform'))" /> </ItemGroup> In .NET 7, we might have a nicer design around this, but for now this is the plan for .NET 6.
- Loading branch information