From c06f4f43015528db45bd6b44b46c057d88b38583 Mon Sep 17 00:00:00 2001
From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Date: Thu, 19 Feb 2026 13:38:46 +0100
Subject: [PATCH] GH-144679: When building with VS 2026 on Windows, use
PlatformToolset v145 by default (GH-144680)
---
.../next/Build/2026-02-10-18-26-04.gh-issue-144679.FIH73W.rst | 2 ++
PCbuild/python.props | 2 +-
PCbuild/pythoncore.vcxproj | 2 +-
Tools/msi/bundle/bootstrap/pythonba.vcxproj | 1 +
4 files changed, 5 insertions(+), 2 deletions(-)
create mode 100644 Misc/NEWS.d/next/Build/2026-02-10-18-26-04.gh-issue-144679.FIH73W.rst
diff --git a/Misc/NEWS.d/next/Build/2026-02-10-18-26-04.gh-issue-144679.FIH73W.rst b/Misc/NEWS.d/next/Build/2026-02-10-18-26-04.gh-issue-144679.FIH73W.rst
new file mode 100644
index 00000000000..ebcfda54da3
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-02-10-18-26-04.gh-issue-144679.FIH73W.rst
@@ -0,0 +1,2 @@
+When building with Visual Studio 2026 (Version 18), use PlatformToolSet v145
+by default. Patch by Chris Eibl.
diff --git a/PCbuild/python.props b/PCbuild/python.props
index 82e6365bb39..3ad8d81dfc9 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -11,7 +11,7 @@
We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
-->
- v143
+ v145
v143
v142
v141
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index 5e37dd33c84..61bee29c0af 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -730,7 +730,7 @@
-
+
diff --git a/Tools/msi/bundle/bootstrap/pythonba.vcxproj b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
index 3970e857894..4b38582f0d3 100644
--- a/Tools/msi/bundle/bootstrap/pythonba.vcxproj
+++ b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
@@ -21,6 +21,7 @@
Release
Win32
+ v145
v143
v142
v141