-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating locator from 1.4.1 to 1.5.3 breaks x86 processes #182
Comments
Do you have an x64 .NET SDK installed, and no x86 SDK? That is typical and would explain this, I think. @Forgind, we probably need to fall back to the old behavior in this case. |
No, I explicitly install an x86 SDK in this step. This was required to get this to work in the first place. |
I'm a little unclear on what exactly the problem is. BadImageFormatException to me sounds like you're loading an x64 MSBuild into your x86 process, as rainersigwald alluded to. How did you choose from the SDK you load MSBuild from? Even if you have the x86 SDK installed, if you choose an x64 SDK, that should still fail. So I guess the change in behavior here is that it implicitly checked the bitness of the current process and chose an SDK from which to call |
I spoke with marcpopMSFT about this, and he said you may be getting bitten by the fact that the SDK no longer adds SDKs that don't match your architecture to the PATH upon installation. In other words, what I proposed above by itself would not work, but he also said he wouldn't expect rainersigwald's suggestion of falling back to the old behavior to work in the long run. His suggestion is to add the path to the x86 SDK to the path yourself. If you want something that can handle multiple SDKs locations on the path, that's a reasonable ask, and we can implement my suggestion. |
By explicitly running the
The x86 SDK may not be on the PATH. It certainly isn't under
These SDKs aren't installed by MSI. They are installed via the |
This would be so much easier if we stopped and built unit tests using my suggestion of building docker scaffolding. |
With the low frequency of releasing MSBuildLocator, we generally think it's easier to just test it manually. That said, if you want to write unit tests that:
Then I, at least, would be happy to look at them and potentially merge them. |
Hi @AArnott , Do you have any issues now with x86? I can see the repo uses 1.5.5 version now. |
The issue still exists. I just worked around it with an ugly hack that requires me to hard-code the absolute path on the machine as to where the x86 SDK ought to be found. |
If you're referring to my |
This simple upgrade PR updates Microsoft.Build.Locator from 1.4.1 to 1.5.3, the PR validation shows that the program now fails, exclusively when run in an x86 process. x64 is fine.
https://dev.azure.com/andrewarnott/OSS/_build/results?buildId=6997&view=logs&j=0bc77094-9fcd-5c38-f6e4-27d2ae131589&t=9d945b7d-bc5d-5e49-44ea-3bb51e12f2d5
Is the Locator finding the x64 binaries when it should be finding x86 binaries?
The text was updated successfully, but these errors were encountered: