-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Microsoft.Maui.Sdk.Before.targets
24 lines (21 loc) · 1.84 KB
/
Microsoft.Maui.Sdk.Before.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<Project>
<PropertyGroup Condition=" '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' ">
<!-- All Windows apps require WinExe -->
<OutputType Condition="'$(OutputType)' == 'Exe'">WinExe</OutputType>
<!-- Generate ReadyToRun (AOT) when building for Release -->
<PublishReadyToRun Condition=" '$(PublishReadyToRun)' == '' and '$(Configuration)' == 'Release' and '$(OutputType)' == 'WinExe' ">true</PublishReadyToRun>
<!-- Use full RID graph: https://github.com/dotnet/docs/issues/36527 -->
<UseRidGraph Condition=" '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' ">true</UseRidGraph>
</PropertyGroup>
<!-- The Windows App SDK does not support AnyCPU without a RID, so make sure we pick the "best" one we can -->
<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' ">
<_SingleProjectRIDRequired Condition="'$(OutputType)' == 'WinExe'">true</_SingleProjectRIDRequired>
<_SingleProjectRIDSpecified Condition="'$(RuntimeIdentifier)' != '' or '$(RuntimeIdentifiers)' != ''">true</_SingleProjectRIDSpecified>
</PropertyGroup>
<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' and '$(_SingleProjectRIDRequired)' == 'true' and '$(_SingleProjectRIDSpecified)' != 'true' ">
<_SingleProjectHostArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_SingleProjectHostArchitecture>
<_SingleProjectHostArchitecture>$(_SingleProjectHostArchitecture.ToLower())</_SingleProjectHostArchitecture>
<RuntimeIdentifier>win10-$(_SingleProjectHostArchitecture)</RuntimeIdentifier>
<_MauiUsingDefaultRuntimeIdentifier>true</_MauiUsingDefaultRuntimeIdentifier>
</PropertyGroup>
</Project>