Skip to content

Commit 768139a

Browse files
authored
Several nuget tests failing to build with VS2022. Standardize on directory.build.props to use PlatformToolset v143 (#1125)
1 parent e0012b0 commit 768139a

File tree

39 files changed

+42
-159
lines changed

39 files changed

+42
-159
lines changed

cppwinrt.props renamed to Directory.Build.Props

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@
22

33
<!-- Set common MSBuild properties and item metadata for CppWinRT tool and tests -->
44

5-
<PropertyGroup Condition="'$(VisualStudioVersion)' == '15.0'">
6-
<PlatformToolset>v141</PlatformToolset>
7-
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
8-
</PropertyGroup>
9-
10-
<PropertyGroup Condition="'$(VisualStudioVersion)' == '16.0'">
11-
<PlatformToolset>v142</PlatformToolset>
12-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
13-
</PropertyGroup>
14-
15-
<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
5+
<PropertyGroup>
166
<PlatformToolset>v143</PlatformToolset>
7+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
8+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
179
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
10+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
1811
</PropertyGroup>
1912

2013
<!--
@@ -38,8 +31,6 @@
3831
<CLToolPath>C:\Program Files\LLVM\bin</CLToolPath>
3932
</PropertyGroup>
4033

41-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
42-
4334
<PropertyGroup>
4435
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">2.3.4.5</CppWinRTBuildVersion>
4536
<CmakePlatform>$(Platform)</CmakePlatform>

cppwinrt/cppwinrt.vcxproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@
122122
<VCProjectVersion>15.0</VCProjectVersion>
123123
<ProjectGuid>{D613FB39-5035-4043-91E2-BAB323908AF4}</ProjectGuid>
124124
<RootNamespace>cppwinrt</RootNamespace>
125-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
126125
</PropertyGroup>
127-
<Import Project="$(SolutionDir)\cppwinrt.props" />
126+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
128127
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
129128
<ConfigurationType>Application</ConfigurationType>
130129
<UseDebugLibraries>true</UseDebugLibraries>

fast_fwd/fast_fwd.vcxproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939
<ProjectGuid>{A63B3AD1-AB7B-461E-9FFF-2447F5BCD459}</ProjectGuid>
4040
<Keyword>Win32Proj</Keyword>
4141
<RootNamespace>fastfwd</RootNamespace>
42-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
4342
</PropertyGroup>
44-
<Import Project="$(SolutionDir)\cppwinrt.props" />
43+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4544
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
4645
<ConfigurationType>StaticLibrary</ConfigurationType>
4746
<UseDebugLibraries>true</UseDebugLibraries>
@@ -120,12 +119,11 @@
120119
<FileType>Document</FileType>
121120
<IncludePaths>src</IncludePaths>
122121
<UseSafeExceptionHandlers Condition="'$(Platform)'=='Win32'">true</UseSafeExceptionHandlers>
123-
<UseSafeExceptionHandlers Condition="'$(Platform)'=='ARM'">true</UseSafeExceptionHandlers>
124-
<UseSafeExceptionHandlers Condition="'$(Platform)'=='ARM64'">true</UseSafeExceptionHandlers>
125122
</MASM>
126123
</ItemGroup>
127124
<ItemGroup Condition="$(Platform_Arm)">
128125
<MARMASM Include="$(IntDir)thunks.pp">
126+
<PreprocessWithCl Condition="'$(VisualStudioVersion)' &gt;= '17.0'">false</PreprocessWithCl>
129127
<FileType>Document</FileType>
130128
<IncludePaths>src</IncludePaths>
131129
</MARMASM>

natvis/cppwinrtvisualizer.vcxproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@
2727
<TargetName>cppwinrtvisualizer</TargetName>
2828
<NugetPackagesDirectory>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)packages\))</NugetPackagesDirectory>
2929
</PropertyGroup>
30-
<PropertyGroup Condition="'$(VisualStudioVersion)' &gt;= '16.0'">
31-
<PlatformToolset>v142</PlatformToolset>
32-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
33-
</PropertyGroup>
34-
<PropertyGroup Condition="'$(VisualStudioVersion)' &lt; '16.0'">
35-
<PlatformToolset>v141</PlatformToolset>
36-
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
37-
</PropertyGroup>
3830
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3931
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4032
<ConfigurationType>DynamicLibrary</ConfigurationType>

prebuild/prebuild.vcxproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838
<VCProjectVersion>15.0</VCProjectVersion>
3939
<ProjectGuid>{FB239623-7D19-4025-BCEA-B43298D4A315}</ProjectGuid>
4040
<RootNamespace>cppwinrt</RootNamespace>
41-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
4241
</PropertyGroup>
43-
<Import Project="$(SolutionDir)\cppwinrt.props" />
42+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4443
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4544
<ConfigurationType>Application</ConfigurationType>
4645
<UseDebugLibraries>true</UseDebugLibraries>

scratch/scratch.vcxproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939
<ProjectGuid>{E893622C-47DE-4F83-B422-0A26711590A4}</ProjectGuid>
4040
<RootNamespace>scratch</RootNamespace>
4141
<ProjectName>scratch</ProjectName>
42-
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
4342
</PropertyGroup>
44-
<Import Project="$(SolutionDir)\cppwinrt.props" />
43+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4544
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4645
<ConfigurationType>Application</ConfigurationType>
4746
<UseDebugLibraries>true</UseDebugLibraries>

test/nuget/ConsoleApplication1/ConsoleApplication1.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<ProjectGuid>{4dd64eae-4b27-415a-863e-55cb8d5863dd}</ProjectGuid>
1212
<Keyword>Win32Proj</Keyword>
1313
<RootNamespace>ConsoleApplication1</RootNamespace>
14-
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
15-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
1614
</PropertyGroup>
1715
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
1816
<ItemGroup Label="ProjectConfigurations">
@@ -35,9 +33,6 @@
3533
</ItemGroup>
3634
<PropertyGroup Label="Configuration">
3735
<ConfigurationType>Application</ConfigurationType>
38-
<PlatformToolset>v140</PlatformToolset>
39-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
40-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
4136
<CharacterSet>Unicode</CharacterSet>
4237
</PropertyGroup>
4338
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">

test/nuget/TestApp/TestApp.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<AppContainerApplication>true</AppContainerApplication>
1414
<ApplicationType>Windows Store</ApplicationType>
1515
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
16-
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
17-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
1816
</PropertyGroup>
1917
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2018
<ItemGroup Label="ProjectConfigurations">
@@ -45,9 +43,6 @@
4543
</ItemGroup>
4644
<PropertyGroup Label="Configuration">
4745
<ConfigurationType>Application</ConfigurationType>
48-
<PlatformToolset>v140</PlatformToolset>
49-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
50-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
5146
<CharacterSet>Unicode</CharacterSet>
5247
</PropertyGroup>
5348
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">

test/nuget/TestRuntimeComponent1/TestRuntimeComponent1.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<AppContainerApplication>true</AppContainerApplication>
1414
<ApplicationType>Windows Store</ApplicationType>
1515
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
16-
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
17-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
1816
</PropertyGroup>
1917
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2018
<ItemGroup Label="ProjectConfigurations">
@@ -45,9 +43,6 @@
4543
</ItemGroup>
4644
<PropertyGroup Label="Configuration">
4745
<ConfigurationType>DynamicLibrary</ConfigurationType>
48-
<PlatformToolset>v140</PlatformToolset>
49-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
50-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
5146
<CharacterSet>Unicode</CharacterSet>
5247
<GenerateManifest>false</GenerateManifest>
5348
</PropertyGroup>

test/nuget/TestRuntimeComponent2/TestRuntimeComponent2.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<AppContainerApplication>true</AppContainerApplication>
1414
<ApplicationType>Windows Store</ApplicationType>
1515
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
16-
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
17-
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
1816
<CppWinRTParameters>-lib $(MSBuildProjectName)</CppWinRTParameters>
1917
</PropertyGroup>
2018
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -46,9 +44,6 @@
4644
</ItemGroup>
4745
<PropertyGroup Label="Configuration">
4846
<ConfigurationType>DynamicLibrary</ConfigurationType>
49-
<PlatformToolset>v140</PlatformToolset>
50-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
51-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
5247
<CharacterSet>Unicode</CharacterSet>
5348
<GenerateManifest>false</GenerateManifest>
5449
</PropertyGroup>

0 commit comments

Comments
 (0)