-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
137 lines (122 loc) · 6.9 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
137 lines (122 loc) · 6.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup>
<!-- Don't ship .NET Standard packages by default, EXCEPT when a project explicitly opts in via
<IsPackable>true</IsPackable> (e.g. the workload manifest and SDK packs, which are netstandard-only
but must ship). The '$(IsPackable)' == '' guard preserves that explicit opt-in. -->
<IsPackable Condition="$(TargetFramework.Contains('netstandard')) and '$(IsPackable)' == ''">false</IsPackable>
</PropertyGroup>
<ItemGroup>
<!-- Upgrade xunit's transitive NETStandard.Library dependency to avoid .NET Standard 1.x dependencies. -->
<!-- <PackageReference Include="NETStandard.Library"
IsImplicitlyDefined="false"
PrivateAssets="all"
ExcludeAssets="runtime"
VersionOverride="2.0.3"
Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard' and
$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.0'))" /> -->
</ItemGroup>
<Import Condition="'$(SampleProject)' != 'true'" Project="eng\Versions.targets" />
<Import Condition="'$(SampleProject)' != 'true' and '$(MauiTestProject)' != 'true'" Project="eng\BannedApis.targets" />
<Import Project="eng\AndroidX.targets" />
<Import Project="eng\NuGetVersions.targets" />
<PropertyGroup>
<!-- Allows for MAUI Xaml Hot Reload Samples to run without checks -->
<IgnoreMauiXamlHotReloadCompatibilityCheck>True</IgnoreMauiXamlHotReloadCompatibilityCheck>
</PropertyGroup>
<PropertyGroup>
<!-- Microsoft.Build.Msix.props" cannot be imported again -->
<!-- Found version-specific or distribution-specific runtime identifier(s)-->
<!-- Ignoring trimming error AD0001 https://github.com/dotnet/runtime/issues/123503-->
<NoWarn>$(NoWarn);NETSDK1206;NU1702;IL6001;AD0001</NoWarn>
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB4011;MSB3277;NETSDK1206;NU1702</MSBuildWarningsAsMessages>
</PropertyGroup>
<!-- platform version number information -->
<PropertyGroup Condition="'$(_MauiTargetPlatformIsiOS)' == 'True'">
<SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>13.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(_MauiTargetPlatformIstvOS)' == 'True'">
<SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(_MauiTargetPlatformIsMacCatalyst)' == 'True'">
<SupportedOSPlatformVersion>17.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>17.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(_MauiTargetPlatformIsmacOS)' == 'True'">
<SupportedOSPlatformVersion>12.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>12.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(_MauiTargetPlatformIsAndroid)' == 'True'">
<SupportedOSPlatformVersion>24.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>24.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(_MauiTargetPlatformIsTizen)' == 'True'">
<SupportedOSPlatformVersion>6.5</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>6.5</TargetPlatformMinVersion>
</PropertyGroup>
<!--
NOTE: The Contains('-windows10') is a bit of a hack
because we don't want to set these properties for WPF projects...
There's probably a better way we should find to infer this
-->
<PropertyGroup Condition="'$(_MauiTargetPlatformIsWindows)' == 'True' AND $(TargetFramework.Contains('-windows10'))">
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<!--
Disable generation of obj/Debug/net8.0-android/__Microsoft.Android.Resource.Designer.cs
Enable this individually in projects that declare/use AndroidResource IDs.
-->
<PropertyGroup Condition="'$(_MauiTargetPlatformIsAndroid)' == 'True' AND '$(AndroidApplication)' != 'true' AND '$(MauiGenerateResourceDesigner)' != 'true'">
<AndroidGenerateResourceDesigner>false</AndroidGenerateResourceDesigner>
<AndroidUseIntermediateDesignerFile Condition="$(TargetFramework.StartsWith('$(_MauiPreviousDotNetTfm)'))">false</AndroidUseIntermediateDesignerFile>
</PropertyGroup>
<!-- semi HACK: by default, WinUI includes all @(None) with .bmp/.png as @(Content) and adds that to the .pri -->
<ItemGroup Condition="'$(_MauiTargetPlatformIsWindows)' == 'True'">
<Content Remove="@(None->WithMetadataValue('Pack','true'))" />
</ItemGroup>
<!-- Until we get net9 rtm -->
<ItemGroup Condition=" '$(_MauiTargetPlatformIsWindows)' == 'True' AND '$(IncludeWindowsSDKRefFrameworkReferences)' == 'True'">
<FrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
</ItemGroup>
<!--
Workaround for https://github.com/microsoft/WindowsAppSDK/issues/2684
-->
<Import Project="src\Core\src\nuget\buildTransitive\WinUI.targets" Condition=" '$(WindowsPackageType)' == 'None' and '$(_MauiTargetPlatformIsWindows)' == 'True' " />
<!-- NuGet package information -->
<PropertyGroup Condition="'$(IsPackable)' == 'true'">
<PackageTags Condition="'$(PackageTags)' == ''">$(DefaultPackageTags)</PackageTags>
<GenerateNuspecDependsOn>
_MauiPackReadmeFile;
$(GenerateNuspecDependsOn);
</GenerateNuspecDependsOn>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(LicenseFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(LicenseFile)'))"
Pack="true" Condition="'$(MSBuildProjectFile)' != 'msi.csproj'" />
<None Include="$(PackageThirdPartyNoticesFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(PackageThirdPartyNoticesFile)'))"
Pack="true" />
</ItemGroup>
<Target Name="_MauiPackReadmeFile" Condition="'$(IsPackable)' == 'true' and '$(PackageReadmeFile)' == ''">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<WriteLinesToFile File="$(IntermediateOutputPath)\$(PackageReadmeFile)"
Lines="$(Description)"
Overwrite="true" />
<ItemGroup>
<_PackageFiles Include="$(IntermediateOutputPath)\$(PackageReadmeFile)"
PackagePath="$(PackageReadmeFile)"
Pack="true" />
</ItemGroup>
</Target>
<!-- Tell typescript to stop deleting everything before building the next TFM -->
<Target Name="TypeScriptDeleteOutputFromOtherConfigs" />
<!-- Don't add any outputs to any item group, we are embedding things manually -->
<Target Name="GetTypeScriptOutputForPublishing" />
<Target Name="GetTypeScriptCopyToOutputDirectoryItems" />
</Project>