2020-05-13 16:23:29 +03:00
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2020-06-05 15:47:54 +03:00
<!-- Default inclusion -->
<PropertyGroup>
<!-- Enable default inclusion behavior unless told otherwise, but default to the value for EnableDefaultItems -->
<!-- We have a public property for each platform, and unify them into a single private property for our own build logic -->
<EnableDefaultiOSItems Condition=" '$(_PlatformName)' == 'iOS' And '$(EnableDefaultiOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaultiOSItems>
<EnableDefaulttvOSItems Condition=" '$(_PlatformName)' == 'tvOS' And '$(EnableDefaulttvOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaulttvOSItems>
<EnableDefaultwatchOSItems Condition=" '$(_PlatformName)' == 'watchOS' And '$(EnableDefaultwatchOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaultwatchOSItems>
<EnableDefaultmacOSItems Condition=" '$(_PlatformName)' == 'macOS' And '$(EnableDefaultmacOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaultmacOSItems>
2021-02-09 16:19:12 +03:00
<EnableDefaultMacCatalystItems Condition=" '$(_PlatformName)' == 'MacCatalyst' And '$(EnableDefaultMacCatalystItems)' == '' ">$(EnableDefaultItems)</EnableDefaultMacCatalystItems>
2020-07-01 19:10:28 +03:00
<!-- Don't include default Compile items for binding projects, because that would pick up ApiDefinition.cs and StructsAndEnums.cs -->
<EnableDefaultCompileItems Condition=" '$(IsBindingProject)' == 'true' ">false</EnableDefaultCompileItems>
2021-04-20 16:09:56 +03:00
2021-08-20 10:53:40 +03:00
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(_PlatformName)' != 'macOS'">true</UseMonoRuntime>
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(_PlatformName)' == 'macOS'">false</UseMonoRuntime>
2020-06-05 15:47:54 +03:00
</PropertyGroup>
2020-06-04 19:30:25 +03:00
<!-- Architecture -->
<!-- If the old-style variables are set, use those -->
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' ">
<TargetArchitectures Condition=" '$(_PlatformName)' == 'macOS' And '$(XamMacArch)' != '' ">$(XamMacArch)</TargetArchitectures>
<TargetArchitectures Condition=" '$(_PlatformName)' != 'macOS' And '$(MtouchArch)' != '' ">$(MtouchArch)</TargetArchitectures>
</PropertyGroup>
<!-- If the old-style variables aren't set, figure it out using RuntimeIdentifier. -->
2021-06-16 17:23:37 +03:00
<PropertyGroup Condition="'$(RuntimeIdentifiers)' != '' And '$(RuntimeIdentifier)' != '' ">
<!-- Check if both RuntimeIdentifier and RuntimeIdentifiers are set, in which case we clear RuntimeIdentifier -->
<!-- Also set a variable that says if this happens, so that we can show a warning later -->
<_RuntimeIdentifiersClashMessage>Both RuntimeIdentifier and RuntimeIdentifiers are set. The value for RuntimeIdentifier will be ignored.</_RuntimeIdentifiersClashMessage>
<!-- Clear RuntimeIdentifier -->
<RuntimeIdentifier />
2021-06-14 21:35:24 +03:00
</PropertyGroup>
2021-06-23 17:53:45 +03:00
<PropertyGroup>
<_ComputeTargetArchitecturesDependsOn>
$(_ComputeTargetArchitecturesDependsOn);
_MapRuntimeIdentifierToTargetArchitecture
</_ComputeTargetArchitecturesDependsOn>
2021-02-09 16:19:12 +03:00
</PropertyGroup>
2020-06-04 19:30:25 +03:00
2021-06-23 17:53:45 +03:00
<!-- Map RuntimeIdentifier(s) to TargetArchitectures, which is what our old targets and tasks expect -->
<!-- This doesn't cover every single possibility (in particular it does not handle ARMv7s, either as a thin or fat option, and the same for ARMv7k), but that can be done by passing /p:TargetArchitectures=ARMv7s to msbuild -->
<Target Name="_MapRuntimeIdentifierToTargetArchitecture" Condition="'$(TargetArchitectures)' == ''">
<ItemGroup>
<!-- Convert RuntimeIdentifiers (a property) to an item group -->
<_RuntimeIdentifierWithTargetArchitecture Include="$(RuntimeIdentifiers);$(RuntimeIdentifier)" />
<!-- map the runtime identifier to a target architecture -->
<_RuntimeIdentifierWithTargetArchitecture Update="@(_RuntimeIdentifierWithTargetArchitecture)">
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-arm64')) ">ARM64</TargetArchitecture>
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-arm')) ">ARMv7</TargetArchitecture>
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-x64')) ">x86_64</TargetArchitecture>
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-x86')) ">i386</TargetArchitecture>
</_RuntimeIdentifierWithTargetArchitecture>
<_RuntimeIdentifiersWithoutTargetArchitecture Include="@(_RuntimeIdentifierWithTargetArchitecture)" Condition="'%(_RuntimeIdentifierWithTargetArchitecture.TargetArchitecture)' == ''" />
</ItemGroup>
<Error Condition="@(_RuntimeIdentifiersWithoutTargetArchitecture->Count()) != 0" Text="Unable to map the following RuntimeIdentifier values to a target architecture: @(_RuntimeIdentifiersWithoutTargetArchitecture)" />
<!-- Map the item group of runtime identifiers into the TargetArchitectures property -->
<PropertyGroup>
<TargetArchitectures>@(_RuntimeIdentifierWithTargetArchitecture -> '%(TargetArchitecture)', ', ')</TargetArchitectures>
</PropertyGroup>
</Target>
2021-02-09 16:19:12 +03:00
<PropertyGroup Condition="'$(ComputedPlatform)' == '' And ('$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS') ">
2021-06-24 15:40:41 +03:00
<ComputedPlatform Condition="$(RuntimeIdentifier.Contains('simulator')) Or $(RuntimeIdentifiers.Contains('simulator'))">iPhoneSimulator</ComputedPlatform>
2021-02-09 16:19:12 +03:00
<ComputedPlatform Condition="'$(ComputedPlatform)' == ''">iPhone</ComputedPlatform>
2020-06-15 18:54:49 +03:00
</PropertyGroup>
2020-05-25 18:38:35 +03:00
<!-- Declare the XI/XM framework bundled with this version of the SDK. See Microsoft.NETCoreSdk.BundledVersions.props -->
<PropertyGroup>
<!-- Runtime pack identifiers -->
2021-04-02 07:02:27 +03:00
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'iOS' ">iossimulator-x64;ios-arm64;ios-arm;iossimulator-x86</_RuntimePackRuntimeIdentifiers>
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'tvOS' ">tvossimulator-x64;tvos-arm64</_RuntimePackRuntimeIdentifiers>
2020-11-20 17:27:46 +03:00
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'watchOS' ">watchos-x86;watchos-x64;watchos-arm</_RuntimePackRuntimeIdentifiers>
2021-03-25 09:26:48 +03:00
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'macOS' ">osx-x64;osx-arm64</_RuntimePackRuntimeIdentifiers>
2021-02-09 16:19:12 +03:00
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'MacCatalyst' ">maccatalyst-x64;maccatalyst-arm64</_RuntimePackRuntimeIdentifiers>
2020-05-25 18:38:35 +03:00
</PropertyGroup>
2021-05-21 23:18:25 +03:00
<PropertyGroup>
<_RuntimeFrameworkVersion>$(BundledNETCorePlatformsPackageVersion)</_RuntimeFrameworkVersion>
<_RuntimeFrameworkVersion Condition="'$(CUSTOM_DOTNET_VERSION)' != ''">$(CUSTOM_DOTNET_VERSION)</_RuntimeFrameworkVersion>
</PropertyGroup>
2020-05-25 18:38:35 +03:00
<ItemGroup>
<KnownFrameworkReference Include="Microsoft.$(_PlatformName)"
2020-09-18 18:41:33 +03:00
TargetFramework="net6.0"
2020-05-25 18:38:35 +03:00
RuntimeFrameworkName="Microsoft.$(_PlatformName)"
2021-08-19 10:03:11 +03:00
DefaultRuntimeFrameworkVersion="**FromWorkload**"
LatestRuntimeFrameworkVersion="**FromWorkload**"
2020-05-25 18:38:35 +03:00
TargetingPackName="Microsoft.$(_PlatformName).Ref"
2021-08-19 10:03:11 +03:00
TargetingPackVersion="**FromWorkload**"
2020-05-25 18:38:35 +03:00
RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**"
RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)"
Profile="$(_PlatformName)"
/>
</ItemGroup>
<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true'">
<FrameworkReference Include="Microsoft.$(_PlatformName)" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
</ItemGroup>
2020-05-13 16:23:29 +03:00
</Project>