-
Notifications
You must be signed in to change notification settings - Fork 106
/
MyNativePackage.targets
21 lines (21 loc) · 1.16 KB
/
MyNativePackage.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="VersionCheckTask"
AssemblyFile = "UWPVersionCheck.dll"/>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP'">
<Content Include="$(MSBuildThisFileDirectory)..\..\lib\uap10.0.14393\time_zones_4.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Target Name="BeforeBuild">
<Target Name="TPMinVCheck" BeforeTargets="Build;ReBuild" Condition="'$(TargetPlatformMinVersion)' != ''">
<PropertyGroup>
<RequiredTPMinV>10.0.14393</RequiredTPMinV>
<ActualTPMinV>$(TargetPlatformMinVersion)</ActualTPMinV>
<PackageId>NativePackage</PackageId>
</PropertyGroup>
<Error
Condition=" '$([System.Version]::Parse($(ActualTPMinV)).CompareTo($([System.Version]::Parse($(RequiredTPMinV)))))' == '-1' "
Text = "The $(PackageId) nuget package cannot be used in the $(MSBuildProjectName) project since the project's TargetPlatformMinVersion - $(ActualTPMinV) does not match the Minimum Version - $(RequiredTPMinV) supported by the package" />
</Target>
</Project>