-
Notifications
You must be signed in to change notification settings - Fork 433
/
Directory.Build.targets
30 lines (27 loc) · 1.83 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
<Project Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<ItemGroup Condition="'$(UseWin32)' == 'true'">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.2-beta" PrivateAssets="all" />
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="52.0.65-preview" PrivateAssets="all" />
<None Remove="NativeMethods.txt" Condition="Exists('NativeMethods.txt')" />
<AdditionalFiles Update="NativeMethods.txt" Link="Properties\NativeMethods.txt" Condition="Exists('NativeMethods.txt')" />
<AdditionalFiles Include="Properties\NativeMethods.txt" Condition="Exists('Properties\NativeMethods.txt')" />
<None Remove="NativeMethods.json" Condition="Exists('NativeMethods.json')" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\NativeMethods.json" Link="Properties\NativeMethods.json" Condition="Exists('$(MSBuildThisFileDirectory)\NativeMethods.json')" />
</ItemGroup>
<Choose>
<When Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' >= '5.0'">
<PropertyGroup>
<IncludeWindowsSDKRefFrameworkReferences Condition="'$(UseWinRT)' != 'true'">false</IncludeWindowsSDKRefFrameworkReferences>
<IncludeWindowsSDKRefFrameworkReferences Condition="'$(UseWinRT)' == 'true'">true</IncludeWindowsSDKRefFrameworkReferences>
</PropertyGroup>
<ItemGroup Condition="'$(UseWinRT)' == 'true'">
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.2" PrivateAssets="all" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup Condition="'$(UseWinRT)' == 'true'">
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="$([System.Version]::Parse('$(TargetPlatformVersion)').ToString(3)).*" PrivateAssets="all" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>