forked from Kinnara/ModernWpf
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Directory.Build.targets
72 lines (69 loc) · 3.95 KB
/
Directory.Build.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
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
<Project>
<PropertyGroup Condition="'$(PackageId)' != ''">
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Kinnara/ModernWpf</PackageProjectUrl>
<PackageTags>WPF XAML UI Theme Controls Fluent Modern Metro WinUI</PackageTags>
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '4.6.1')) or
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<DefineConstants>$(DefineConstants);NET461_OR_NEWER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '4.6.2')) or
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<DefineConstants>$(DefineConstants);NET462_OR_NEWER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '4.7')) or
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<DefineConstants>$(DefineConstants);NET47_OR_NEWER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '4.7.2')) or
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<DefineConstants>$(DefineConstants);NET472_OR_NEWER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '4.8')) or
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<DefineConstants>$(DefineConstants);NET48_OR_NEWER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))">
<DefineConstants>$(DefineConstants);NET5_0_OR_NEWER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(SupportedOSPlatform)' != '' and $([MSBuild]::VersionGreaterThan($(SupportedOSPlatform), '7.0'))">
<SupportedOSPlatform>7.0</SupportedOSPlatform>
</PropertyGroup>
<Choose>
<When Condition="'$(UseWinRT)' == 'true'">
<Choose>
<When Condition="$(DefineConstants.Contains('NET5_0_OR_NEWER'))" />
<When Condition="$(DefineConstants.Contains('NET461_OR_NEWER'))">
<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.22621.755" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<PackageReference Include="System.Runtime.WindowsRuntime" Version="4.7.0" />
<Reference Include="Windows">
<HintPath>$(MSBuildThisFileDirectory)WinMD\Windows.WinMD</HintPath>
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
</Reference>
<Reference Include="Windows.Foundation.FoundationContract">
<HintPath>$(MSBuildThisFileDirectory)WinMD\Windows.Foundation.FoundationContract.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
</Reference>
<Reference Include="Windows.Foundation.UniversalApiContract">
<HintPath>$(MSBuildThisFileDirectory)WinMD\Windows.Foundation.UniversalApiContract.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
</Reference>
</ItemGroup>
</Otherwise>
</Choose>
</When>
</Choose>
</Project>