Skip to content

Conversation

@WhenToBen
Copy link

Currently, when you have an Insiders (pre-release) version of Visual Studio 2026 installed, you will get the following error when trying to build Godot (or at least, I did when I tried that):

ValueError: invalid literal for int() with base 10: ' Insiders [11116':
1>    File "C:\Users\user\Git\godot\SConstruct", line 668:
1>      cc_version = methods.get_compiler_version(env)
1>    File "C:\Users\user\Git\godot\methods.py", line 734:
1>      ret["major"] = int(sem_ver[0])

This is because the build script currently checks the catalog_productDisplayVersion property of the newest version of Visual Studio currently installed, including pre-release versions. While for most stable releases this property actually is set as the semantic version, for the Insiders versions this version is set as Insiders [xxx.yyy].
Running vswhere.exe -latest -prerelease -products * -requires Microsoft.Component.MSBuild -utf8 gives some version strings which could work better as semantic versions, especially catalog_productSemanticVersion since it actually follows the x.y.z[-suffix] format:

installationName: VisualStudioPreview/18.0.0-insiders+11116.177
installationPath: C:\Program Files\Microsoft Visual Studio\18\Insiders
installationVersion: 18.0.11116.177
productPath: C:\Program Files\Microsoft Visual Studio\18\Insiders\Common7\IDE\devenv.exe
isComplete: 1
isLaunchable: 1
isPrerelease: 1
isRebootRequired: 0
displayName: Visual Studio Community 2026
description: Everything you need to build modern apps – free for you, built for impact.
channelId: VisualStudio.18.Preview
channelUri: https://aka.ms/vs/18/insiders/channel
installedChannelId: VisualStudio.18.Preview
catalog_buildBranch: d18.0
catalog_buildVersion: 18.0.11116.177
catalog_expirationDate: 12/05/2025 17:00:00 +00:00
catalog_id: VisualStudioPreview/18.0.0-insiders+11116.177
catalog_includeBuildVersionInDisplayVersion: True
catalog_localBuild: build-lab
catalog_manifestName: VisualStudioPreview
catalog_manifestType: installer
catalog_productDisplayVersion: Insiders [11116.177]                        <--- Not a semantic version right now
catalog_productLine: Dev18
catalog_productLineVersion: 18
catalog_productMilestone: Insiders
catalog_productMilestoneIsPreRelease: True
catalog_productName: Visual Studio
catalog_productPatchVersion: 0
catalog_productRelease: RTW
catalog_productSemanticVersion: 18.0.0-insiders+11116.177                  <--- Semantic version with suffix
catalog_requiredEngineVersion: 4.0.2153.56108
properties_channelManifestId: VisualStudio.18.Preview/18.0.0-insiders+11116.177
properties_includeRecommended: 0
[some mostly irrelevant and empty lines removed]

@WhenToBen WhenToBen requested a review from a team as a code owner October 22, 2025 13:05
@akien-mga akien-mga changed the title MSVC: check catalog_productSemanticVersion instead of catalog_productDisplayVersion MSVC: Check catalog_productSemanticVersion instead of catalog_productDisplayVersion Oct 22, 2025
@akien-mga akien-mga added this to the 4.6 milestone Oct 22, 2025
@akien-mga akien-mga requested a review from Repiteo October 22, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants