microsoft / MSBuildLocator

An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
216 stars 83 forks source link

Find x64 MSBuild from Locator #135

Closed Forgind closed 2 years ago

Forgind commented 2 years ago

Fixes https://github.com/dotnet/msbuild/issues/6681 for pre-17.0 MSBuild.

MSBuild can be loaded from the x86 or x64 folder. Before 17.0, it looked next to the executing assembly in some cases and constructed a path that assumed x86 in others. This overrides the latter assumption to let it find the right MSBuild.