Visitar URL original
64-bit MSBuild.exe is not used when custom process is 64-bit · Issue #133 · microsoft/MSBuildLocator · GitHub
Skip to content

64-bit MSBuild.exe is not used when custom process is 64-bit #133

Open

Description

@jeffkl

If you create a custom application that is AnyCPU but prefer 32-bit is set to false, then MSBuild locator will register the 32-bit MSBuild. This breaks out-of-proc builds with an error like this:

Build was canceled. Failed to successfully launch or connect to a child MSBuild.exe process. 
Verify that the MSBuild.exe "C:\Program Files (x86)\Visual Studio 2019 Preview\MSBuild\Current\Bin\MSBuild.exe"
 launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded.
 If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with
 the MSBUILD_EXE_PATH environment variable.

This is because the handshake between the 64-bit application and the 32-bit MSBuild.exe doesn't match up. MSBuildLocator should use the 64-bit MSBuild.exe if Environment.Is64BitProcess is true

Activity

  1. MattParkerDev commented on Aug 1, 2025

    @MattParkerDev

    Jeff Kluge (@jeffkl) is there a workaround for this? I tried using <PlatformTarget>x64</PlatformTarget>, but still get the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions