From 48185eeda36a2df0a44670c1882aa300b5a35b71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 00:23:19 +0000 Subject: [PATCH 1/2] Migrate GitHub CI off VS 2022 (v143) to v145/VS 2026 --- .github/instructions/cppwinrt.instructions.md | 2 +- .github/workflows/ci.yml | 21 +++---------------- Directory.Build.Props | 2 +- .../nuget/TestProxyStub/TestProxyStub.vcxproj | 2 +- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/instructions/cppwinrt.instructions.md b/.github/instructions/cppwinrt.instructions.md index ba5d66212..ebaf7db38 100644 --- a/.github/instructions/cppwinrt.instructions.md +++ b/.github/instructions/cppwinrt.instructions.md @@ -25,7 +25,7 @@ - Use VS Developer Shell for correct toolset environment - `cmake --build build --config Release --target cppwinrt` for cppwinrt.exe (or MSBuild: `msbuild cppwinrt\cppwinrt.vcxproj /p:Configuration=Release /p:Platform=x64`) - NuGet tests: `msbuild test\nuget\NuGetTest.sln /p:Configuration=Release /p:Platform=x64` -- Module test projects require v145 toolset (VS 2026). Directory.Build.Props sets v143 by default — override with `v145` in Configuration PropertyGroup +- Module test projects require v145 toolset (VS 2026). Directory.Build.Props sets v145 by default; older toolsets can be selected by overriding `` in the Configuration PropertyGroup ## Key Patterns diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c2a04353..855c136f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,6 @@ jobs: arch: [x86, x64, arm64] config: [Debug, Release] toolchain: - - image: windows-2025 - platform_toolset: v143 - image: windows-2025-vs2026 platform_toolset: v145 exclude: @@ -101,8 +99,6 @@ jobs: config: [Debug, Release] test_exe: [test, test_nocoro, test_cpp20, test_cpp20_no_sourcelocation, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none] toolchain: - - image: windows-2025 - platform_toolset: v143 - image: windows-2025-vs2026 platform_toolset: v145 exclude: @@ -295,7 +291,7 @@ jobs: arch: [x86, x64, arm64] config: [Release] Deployment: [Component, Standalone] - runs-on: windows-latest + runs-on: windows-2025-vs2026 steps: - uses: actions/checkout@v6 @@ -316,7 +312,7 @@ jobs: $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" $target_version = "999.999.999.999" - Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version" + Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version,PlatformToolset=v145" - name: Restore nuget packages run: | @@ -336,8 +332,6 @@ jobs: arch: [x86, x64] config: [Release] toolchain: - - image: windows-2025 - platform_toolset: v143 - image: windows-2025-vs2026 platform_toolset: v145 runs-on: ${{ matrix.toolchain.image }} @@ -378,15 +372,6 @@ jobs: $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" & "_build\$target_platform\$target_configuration\cppwinrt.exe" -in local -out _build\$target_platform\$target_configuration -verbose - - - name: Remove module test projects on v143 - if: matrix.toolchain.platform_toolset == 'v143' - run: | - # Module test projects require v145 toolset - mv test\nuget\NugetTest.sln test\nuget\NugetTest.sln.orig - Get-Content test\nuget\NugetTest.sln.orig | - Where-Object { -not ($_ -match 'TestModule') } | - Set-Content test\nuget\NugetTest.sln - name: Run nuget test run: | @@ -394,7 +379,7 @@ jobs: build-nuget: name: Build nuget package with MSVC - runs-on: windows-latest + runs-on: windows-2025-vs2026 steps: - uses: actions/checkout@v6 diff --git a/Directory.Build.Props b/Directory.Build.Props index c98cd5dd0..ffd3ef8b6 100644 --- a/Directory.Build.Props +++ b/Directory.Build.Props @@ -3,7 +3,7 @@ - v143 + v145 10.0 10.0.18362.0 diff --git a/test/nuget/TestProxyStub/TestProxyStub.vcxproj b/test/nuget/TestProxyStub/TestProxyStub.vcxproj index 69e41cfba..84d3b37c3 100644 --- a/test/nuget/TestProxyStub/TestProxyStub.vcxproj +++ b/test/nuget/TestProxyStub/TestProxyStub.vcxproj @@ -40,7 +40,7 @@ DynamicLibrary - v143 + v145 Unicode From a8cf1d319a671be668aa6b2c6f9d6bd4ba542790 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 00:37:18 +0000 Subject: [PATCH 2/2] Add C++20 module test to CI; dynamic v143/v145 toolset selection --- .github/instructions/cppwinrt.instructions.md | 2 +- .github/workflows/ci.yml | 5 ++++- Directory.Build.Props | 5 ++++- test/nuget/TestProxyStub/TestProxyStub.vcxproj | 1 - 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/instructions/cppwinrt.instructions.md b/.github/instructions/cppwinrt.instructions.md index ebaf7db38..eae2fc3c6 100644 --- a/.github/instructions/cppwinrt.instructions.md +++ b/.github/instructions/cppwinrt.instructions.md @@ -25,7 +25,7 @@ - Use VS Developer Shell for correct toolset environment - `cmake --build build --config Release --target cppwinrt` for cppwinrt.exe (or MSBuild: `msbuild cppwinrt\cppwinrt.vcxproj /p:Configuration=Release /p:Platform=x64`) - NuGet tests: `msbuild test\nuget\NuGetTest.sln /p:Configuration=Release /p:Platform=x64` -- Module test projects require v145 toolset (VS 2026). Directory.Build.Props sets v145 by default; older toolsets can be selected by overriding `` in the Configuration PropertyGroup +- Module test projects require v145 toolset (VS 2026). Directory.Build.Props selects v145 when VisualStudioVersion >= 18.0 (VS 2026) and falls back to v143 otherwise; override `` in the Configuration PropertyGroup to force a specific toolset ## Key Patterns diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 855c136f4..37f42ab70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: compiler: [MSVC, clang-cl] arch: [x86, x64, arm64] config: [Debug, Release] - test_exe: [test, test_nocoro, test_cpp20, test_cpp20_no_sourcelocation, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none] + test_exe: [test, test_nocoro, test_cpp20, test_cpp20_no_sourcelocation, test_cpp20_module, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none] toolchain: - image: windows-2025-vs2026 platform_toolset: v145 @@ -108,6 +108,9 @@ jobs: arch: arm64 - compiler: clang-cl config: Release + # C++20 named modules require the MSVC v145 toolset; clang-cl is not supported. + - compiler: clang-cl + test_exe: test_cpp20_module runs-on: ${{ matrix.toolchain.image }} steps: - uses: actions/checkout@v6 diff --git a/Directory.Build.Props b/Directory.Build.Props index ffd3ef8b6..5972803c0 100644 --- a/Directory.Build.Props +++ b/Directory.Build.Props @@ -3,7 +3,10 @@ - v145 + + v143 + v145 10.0 10.0.18362.0 diff --git a/test/nuget/TestProxyStub/TestProxyStub.vcxproj b/test/nuget/TestProxyStub/TestProxyStub.vcxproj index 84d3b37c3..cd646da7f 100644 --- a/test/nuget/TestProxyStub/TestProxyStub.vcxproj +++ b/test/nuget/TestProxyStub/TestProxyStub.vcxproj @@ -40,7 +40,6 @@ DynamicLibrary - v145 Unicode