Skip to content

Recalculate MSBuild path from VS Root#6746

Merged
rokonec merged 1 commit into
dotnet:mainfrom
rainersigwald:64-bit-environment
Aug 11, 2021
Merged

Recalculate MSBuild path from VS Root#6746
rokonec merged 1 commit into
dotnet:mainfrom
rainersigwald:64-bit-environment

Conversation

@rainersigwald
Copy link
Copy Markdown
Member

A 64-bit application is now (after #6683) getting a good VS root path,
but may still use toolsets from the wrong directory, because if it
loaded (AnyCPU) assemblies from the 'x86' location it wouldn't pass
a path containing amd64 to the BuildEnvironment constructor, so
the logic there wouldn't find the right MSBuildToolsDirectory and
config file.

Fix this in the lowest-impact way by rederiving the path to the
'correct' MSBuild.exe from the VS root and passing that to the
BuildEnvironment constructor.

Fixes #6681.

A 64-bit application is now (after dotnet#6683) getting a good VS root path,
but may still use toolsets from the wrong directory, because if it
loaded (AnyCPU) assemblies from the 'x86' location it wouldn't pass
a path containing �md64 to the BuildEnvironment constructor, so
the logic there wouldn't find the right MSBuildToolsDirectory and
config file.

Fix this in the lowest-impact way by rederiving the path to the
'correct' MSBuild.exe from the VS root and passing that to the
BuildEnvironment constructor.
Copy link
Copy Markdown
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😔

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Aug 10, 2021
@rokonec rokonec merged commit b0bb46a into dotnet:main Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

64-bit API clients can wind up with imports that don't match MSBuild.exe/VS's

5 participants