Skip to content

setuptools.msvc: Fix EnvironmentInfo MSBuild property with VS2017+ - #5276

Open
swt2c wants to merge 1 commit into
pypa:mainfrom
swt2c:fix_msbuild_newer_vs
Open

setuptools.msvc: Fix EnvironmentInfo MSBuild property with VS2017+#5276
swt2c wants to merge 1 commit into
pypa:mainfrom
swt2c:fix_msbuild_newer_vs

Conversation

@swt2c

@swt2c swt2c commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Microsoft changed the location of the MSBuild executable in newer Visual Studio versions. First, correct the VSInstallDir by checking known_vs_paths which is already done in other places. Then, use the "Current" directory scheme used on VS2019+. Lastly, move MSBuild before FxTools as the FxTools directory contains an outdated version of MSBuild.

Closes #5275

Pull Request Checklist

@mergify

mergify Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Microsoft changed the location of the MSBuild executable in newer Visual
Studio versions.  First, correct the VSInstallDir by checking
known_vs_paths which is already done in other places.  Then, use the
"Current" directory scheme used on VS2019+.  Lastly, move MSBuild before
FxTools as the FxTools directory contains an outdated version of
MSBuild.

Fixes: pypa#5275
@swt2c
swt2c force-pushed the fix_msbuild_newer_vs branch from 1fd3ed4 to 52a30da Compare July 19, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] setuptools.msvc.EnvironmentInfo MSBuild property result incorrect on VS2017+

1 participant