Skip to content

Commit ac226ee

Browse files
authored
Update platform toolset (microsoft#5882)
The solution does not build in VS 2026 because it defaults to using the v140 toolset (VS 2015), which is no longer supported. This PR adds the configuration to use the latest toolset v145 in VS 2026 (v18), and removes the options for v140 (VS 2015) and v141 (VS 2017). I'm also setting this in the `Directory.Build.props` and removing the configuration from the individual projects. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5882)
1 parent 0d5b16b commit ac226ee

File tree

25 files changed

+19
-186
lines changed

25 files changed

+19
-186
lines changed

samples/MinimalCallers/C++/WinGet-InProc/WinGet-InProc.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3939
<PropertyGroup Label="Configuration">
4040
<ConfigurationType>Application</ConfigurationType>
41-
<PlatformToolset>v143</PlatformToolset>
42-
<CharacterSet>Unicode</CharacterSet>
4341
</PropertyGroup>
4442
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
4543
<UseDebugLibraries>true</UseDebugLibraries>

samples/MinimalCallers/C++/WinGet-OutOfProc/WinGet-OutOfProc.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3939
<PropertyGroup Label="Configuration">
4040
<ConfigurationType>Application</ConfigurationType>
41-
<PlatformToolset>v143</PlatformToolset>
42-
<CharacterSet>Unicode</CharacterSet>
4341
</PropertyGroup>
4442
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
4543
<UseDebugLibraries>true</UseDebugLibraries>

samples/WinGetUWPCaller/WinGetUWPCaller/WinGetUWPCaller.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@
4646
</ItemGroup>
4747
<PropertyGroup Label="Configuration">
4848
<ConfigurationType>Application</ConfigurationType>
49-
<PlatformToolset>v140</PlatformToolset>
50-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
51-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
52-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
53-
<CharacterSet>Unicode</CharacterSet>
5449
</PropertyGroup>
5550
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
5651
<UseDebugLibraries>true</UseDebugLibraries>

src/AppInstallerCLI/AppInstallerCLI.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@
4242
</ItemGroup>
4343
<PropertyGroup Label="Configuration">
4444
<ConfigurationType>Application</ConfigurationType>
45-
<PlatformToolset>v140</PlatformToolset>
46-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
47-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
48-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
49-
<CharacterSet>Unicode</CharacterSet>
5045
</PropertyGroup>
5146
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
5247
<UseDebugLibraries>true</UseDebugLibraries>

src/AppInstallerCLICore/AppInstallerCLICore.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
</ItemGroup>
5555
<PropertyGroup Label="Configuration">
5656
<ConfigurationType>StaticLibrary</ConfigurationType>
57-
<PlatformToolset>v140</PlatformToolset>
58-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
59-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
60-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
61-
<CharacterSet>Unicode</CharacterSet>
6257
</PropertyGroup>
6358
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
6459
<UseDebugLibraries>true</UseDebugLibraries>

src/AppInstallerCLITests/AppInstallerCLITests.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
</ItemGroup>
4646
<PropertyGroup Label="Configuration">
4747
<ConfigurationType>Application</ConfigurationType>
48-
<PlatformToolset>v140</PlatformToolset>
49-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
50-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
51-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
52-
<CharacterSet>Unicode</CharacterSet>
5348
</PropertyGroup>
5449
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
5550
<UseDebugLibraries>true</UseDebugLibraries>

src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@
6262
</ItemGroup>
6363
<PropertyGroup Label="Configuration">
6464
<ConfigurationType>StaticLibrary</ConfigurationType>
65-
<PlatformToolset>v140</PlatformToolset>
66-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
67-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
68-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
69-
<CharacterSet>Unicode</CharacterSet>
7065
</PropertyGroup>
7166
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
7267
<UseDebugLibraries>true</UseDebugLibraries>
@@ -481,5 +476,3 @@
481476
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.250303.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
482477
</Target>
483478
</Project>
484-
485-

src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
</ItemGroup>
5555
<PropertyGroup Label="Configuration">
5656
<ConfigurationType>StaticLibrary</ConfigurationType>
57-
<PlatformToolset>v140</PlatformToolset>
58-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
59-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
60-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
61-
<CharacterSet>Unicode</CharacterSet>
6257
</PropertyGroup>
6358
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
6459
<UseDebugLibraries>true</UseDebugLibraries>

src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@
6161
</ItemGroup>
6262
<PropertyGroup Label="Configuration">
6363
<ConfigurationType>StaticLibrary</ConfigurationType>
64-
<PlatformToolset>v140</PlatformToolset>
65-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
66-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
67-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
68-
<CharacterSet>Unicode</CharacterSet>
6964
</PropertyGroup>
7065
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
7166
<UseDebugLibraries>true</UseDebugLibraries>

src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
</ItemGroup>
3939
<PropertyGroup Label="Configuration">
4040
<ConfigurationType>Application</ConfigurationType>
41-
<PlatformToolset>v140</PlatformToolset>
42-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
43-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
44-
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
45-
<CharacterSet>Unicode</CharacterSet>
4641
</PropertyGroup>
4742
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
4843
<LinkIncremental>true</LinkIncremental>

0 commit comments

Comments
 (0)