forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dotnet] 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
1 parent
8d39c86
commit d9e1963
Showing
4 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters