-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildTargets.target
25 lines (24 loc) · 1.22 KB
/
BuildTargets.target
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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Target Name="DetectWinVersionConstants">
<Message Text='--===Setting Windows EnvVariables"===--' Importance="Normal"/>
<PropertyGroup>
<WindowsMajorVersion>$([System.Environment]::OSVersion.Version.Major)</WindowsMajorVersion>
</PropertyGroup>
<PropertyGroup>
<WindowsMinorVersion>$([System.Environment]::OSVersion.Version.Minor)</WindowsMinorVersion>
</PropertyGroup>
<PropertyGroup Condition="$(WindowsMajorVersion)>=6">
<WinVersion>WIN_VISTA;WIN_2008</WinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(WindowsMajorVersion)>=6 And $(WindowsMinorVersion)>=1 ">
<WinVersion>$(WinVersion);WIN_SEVEN;WIN_2008_R2</WinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(WindowsMajorVersion)>=6 And $(WindowsMinorVersion)>=2 ">
<WinVersion>$(WinVersion);WIN_EIGHT;WIN_2012</WinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(WindowsMajorVersion)>=6 And $(WindowsMinorVersion)>=3 ">
<WinVersion>$(WinVersion);WIN_EIGHT_DOT_ONE;WIN_2012_R2</WinVersion>
</PropertyGroup>
<Message Text='Windows version variables: WinVersion=$(WinVersion)' Importance="High"/>
</Target>
</Project>