Skip to content

Commit cb13bbc

Browse files
authored
feat: add support for Visual Studio 2026 (#319)
* feat: add support for Visual Studio 2026 * fix(vs2026): Correct E501 line length and adjust detection for 18.0) * fix: Correct E501 syntax error using line continuation
1 parent 6341ec0 commit cb13bbc

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

pylib/gyp/MSVSVersion.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,18 @@ def _CreateVersion(name, path, sdk_based=False):
270270
if path:
271271
path = os.path.normpath(path)
272272
versions = {
273+
"2026": VisualStudioVersion(
274+
"2026",
275+
"Visual Studio 2026",
276+
solution_version="12.00",
277+
project_version="18.0",
278+
flat_sln=False,
279+
uses_vcxproj=True,
280+
path=path,
281+
sdk_based=sdk_based,
282+
default_toolset="v145",
283+
compatible_sdks=["v8.1", "v10.0"],
284+
),
273285
"2022": VisualStudioVersion(
274286
"2022",
275287
"Visual Studio 2022",
@@ -462,6 +474,7 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
462474
"15.0": "2017",
463475
"16.0": "2019",
464476
"17.0": "2022",
477+
"18.0": "2026",
465478
}
466479
versions = []
467480
for version in versions_to_check:
@@ -537,7 +550,18 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True):
537550
if version == "auto":
538551
version = os.environ.get("GYP_MSVS_VERSION", "auto")
539552
version_map = {
540-
"auto": ("17.0", "16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"),
553+
"auto": (
554+
"18.0",
555+
"17.0",
556+
"16.0",
557+
"15.0",
558+
"14.0",
559+
"12.0",
560+
"10.0",
561+
"9.0",
562+
"8.0",
563+
"11.0",
564+
),
541565
"2005": ("8.0",),
542566
"2005e": ("8.0",),
543567
"2008": ("9.0",),
@@ -552,6 +576,7 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True):
552576
"2017": ("15.0",),
553577
"2019": ("16.0",),
554578
"2022": ("17.0",),
579+
"2026": ("18.0",),
555580
}
556581
if override_path := os.environ.get("GYP_MSVS_OVERRIDE_PATH"):
557582
msvs_version = os.environ.get("GYP_MSVS_VERSION")

0 commit comments

Comments
 (0)