diff --git a/.github/workflows/nodejs-windows.yml b/.github/workflows/nodejs-windows.yml
index 4e6c9548..bfbfb9f1 100644
--- a/.github/workflows/nodejs-windows.yml
+++ b/.github/workflows/nodejs-windows.yml
@@ -9,7 +9,7 @@ on:
jobs:
build-windows:
- runs-on: windows-2019
+ runs-on: windows-latest
steps:
- name: Clone gyp-next
uses: actions/checkout@v3
diff --git a/pylib/gyp/easy_xml_test.py b/pylib/gyp/easy_xml_test.py
index c5808b84..2d9b1521 100755
--- a/pylib/gyp/easy_xml_test.py
+++ b/pylib/gyp/easy_xml_test.py
@@ -77,6 +77,7 @@ def test_EasyXml_complex(self):
"Application"
"Unicode"
"SpectreLoadCF"
+ "14.36.32532"
""
""
)
@@ -100,7 +101,8 @@ def test_EasyXml_complex(self):
},
["ConfigurationType", "Application"],
["CharacterSet", "Unicode"],
- ["SpectreMitigation", "SpectreLoadCF"]
+ ["SpectreMitigation", "SpectreLoadCF"],
+ ["VCToolsVersion", "14.36.32532"],
],
]
)
diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
index 0e7ec4d9..1f9e2497 100644
--- a/pylib/gyp/generator/msvs.py
+++ b/pylib/gyp/generator/msvs.py
@@ -3004,6 +3004,7 @@ def _GetMSBuildConfigurationDetails(spec, build_file):
msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file)
condition = _GetConfigurationCondition(name, settings, spec)
character_set = msbuild_attributes.get("CharacterSet")
+ vctools_version = msbuild_attributes.get("VCToolsVersion")
config_type = msbuild_attributes.get("ConfigurationType")
_AddConditionalProperty(properties, condition, "ConfigurationType", config_type)
spectre_mitigation = msbuild_attributes.get('SpectreMitigation')
@@ -3019,6 +3020,10 @@ def _GetMSBuildConfigurationDetails(spec, build_file):
_AddConditionalProperty(
properties, condition, "CharacterSet", character_set
)
+ if vctools_version and "msvs_enable_winrt" not in spec:
+ _AddConditionalProperty(
+ properties, condition, "VCToolsVersion", vctools_version
+ )
return _GetMSBuildPropertyGroup(spec, "Configuration", properties)
@@ -3100,6 +3105,8 @@ def _ConvertMSVSBuildAttributes(spec, config, build_file):
msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a])
elif a == "SpectreMitigation":
msbuild_attributes[a] = msvs_attributes[a]
+ elif a == "VCToolsVersion":
+ msbuild_attributes[a] = msvs_attributes[a]
else:
print("Warning: Do not know how to convert MSVS attribute " + a)
return msbuild_attributes