xamarin-macios/dotnet
Jonathan Peppers 7fb9bc98f0
[dotnet] add %(Platform) to any global @(Using) (#13196)
Context: https://github.com/dotnet/maui/pull/3018#pullrequestreview-792369556

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.
2021-11-02 07:37:58 +01:00
..
Microsoft.MacCatalyst.Sdk [dotnet] Update logic for default global namespaces and fix the templates. Fixes #12457. (#12471) 2021-08-19 07:47:03 +02:00
Microsoft.iOS.Sdk [dotnet] Update logic for default global namespaces and fix the templates. Fixes #12457. (#12471) 2021-08-19 07:47:03 +02:00
Microsoft.iOS.Windows.Sdk Import .NET 6 property page targets path in iOS sdk targets (#12556) 2021-08-27 12:17:06 +02:00
Microsoft.macOS.Sdk [dotnet] Update logic for default global namespaces and fix the templates. Fixes #12457. (#12471) 2021-08-19 07:47:03 +02:00
Microsoft.tvOS.Sdk [dotnet] Update logic for default global namespaces and fix the templates. Fixes #12457. (#12471) 2021-08-19 07:47:03 +02:00
Templates [dotnet/Templates] Add preview language (#12965) 2021-10-11 08:00:01 +02:00
Workloads [CI] Update SignList.xml to fix publishing 2021-10-20 21:46:13 -04:00
package [dotnet] Remove watchOS code and from our .NET support. (#12764) 2021-09-20 07:40:03 +02:00
targets [dotnet] add %(Platform) to any global @(Using) (#13196) 2021-11-02 07:37:58 +01:00
.gitignore [dotnet] use **FromWorkload** for targeting/runtime pack versions (#12449) 2021-08-19 09:03:11 +02:00
BreakingChanges.md [.NET] Move the nfloat type to the ObjCRuntime namespace for .NET. (#13092) 2021-10-28 11:06:31 +02:00
DefaultCompilationIncludes.md [dotnet] Remove watchOS code and from our .NET support. (#12764) 2021-09-20 07:40:03 +02:00
HIERARCHY.md [dotnet] Add support for 'dotnet publish'. Fixes #11807. (#12397) 2021-08-11 10:01:16 +02:00
Makefile [main] Update dependencies from dotnet/installer (#13093) 2021-10-29 18:46:00 +02:00
PackageInfo.plist Fix typos in comments. 2020-10-19 10:38:11 +02:00
SingleProject.md [dotnet] rename $(AppleShortVersion) to $(ApplicationDisplayVersion) (#12647) 2021-09-08 10:13:29 -04:00
VERSIONS.md Rename master to main. (#8851) 2020-06-16 15:51:44 +02:00
build-custom-runtime.sh [configure] Add option to use a locally built dotnet/runtime. (#11643) 2021-05-21 22:18:25 +02:00
generate-target-platforms.csharp Bump to .NET 5.0.100-rc.2.20459.1 (#9758) 2020-10-02 08:31:38 +02:00
generate-wix.csharp [dotnet] Package the workloads in a Windows installer (.msi) as well. (#9979) 2020-10-28 11:09:55 +01:00