51 строка
2.2 KiB
XML
51 строка
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
This file contains implicit namespace imports
|
|
|
|
*** WARNING ***
|
|
|
|
This file is imported by AutoImport.props, and will be imported by all
|
|
projects using Microsoft.NET.Sdk. All Item includes in this file *MUST*
|
|
be hidden behind a TargetPlatformIdentifier based condition.
|
|
|
|
This file can also not define any properties. However, due to the
|
|
order MSBuild evaluates properties, it's possible to use properties
|
|
defined in our .targets files in conditions in ItemGroups in this
|
|
file.
|
|
|
|
*** WARNING ***
|
|
|
|
-->
|
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<!--
|
|
These implicit usings are C#-specific, and governed by a single global property: ImplicitUsings, which can be either 'true' or 'enable'.
|
|
Ref: https://github.com/dotnet/sdk/issues/19793#issuecomment-900620060
|
|
-->
|
|
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'macOS' And '$(Language)' == 'C#' And ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
|
|
<Using Include="AppKit" Platform="macOS" />
|
|
<Using Include="CoreGraphics" Platform="macOS" />
|
|
<Using Include="Foundation" Platform="macOS" />
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
Add a 'global using nfloat = System.Runtime.InteropServices.NFloat' to ease migration from Xamarin.
|
|
This is not grouped with the other usings, because those are not enabled by default (ImplicitUsings is empty by default, but set in our templates).
|
|
However, the main target for this using is upgraded projects, which won't have ImplicitUsings set to anything, so we
|
|
use a different condition (NoNFloatUsing) to disable if desired.
|
|
Note: we only add this if compiling using C# 10 or later.
|
|
-->
|
|
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'macOS'
|
|
And '$(Language)' == 'C#'
|
|
And '$(NoNFloatUsing)' != 'true'
|
|
And ('$(LangVersion)' == ''
|
|
Or '$(LangVersion)' == 'preview'
|
|
Or '$(LangVersion)' == 'latest'
|
|
Or '$(LangVersion)' == 'latestMajor'
|
|
Or '$(LangVersion)' == 'default'
|
|
Or $([MSBuild]::VersionGreaterThanOrEquals('$(LangVersion)','10.0'))
|
|
)">
|
|
<Using Include="System.Runtime.InteropServices.NFloat" Platform="macOS" Alias="nfloat" />
|
|
</ItemGroup>
|
|
</Project>
|