-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dotnet tools use wrong architecture of libhostfxr.dylib on Mac M1 #27761
Comments
Output of
Output of
|
Yeah, this is a gap with tool install - I believe you can get around it for now with the |
Only installing I believe the issue that it's scanning the |
Ah, I figured it out. It is indeed a runtime issue (feel free to migrate this to dotnet/runtime). The error I get is from here: Tracing in to I see a comment:
So I set in my
Then I uninstall and reinstall the tool (with either |
I'd say it's still a bug in that by default after installing the SDKs, those environment variables are not set. Probably the runtime should continue to try to resolve one matching the architecture of the tool rather than giving up after finding the mismatch. |
What is in your The env. variables are typically only for private (.zip) installs. Globally installed runtime should register itself in |
@vitek-karas - In |
The right question is: why is there no |
Ok. I just deleted everything to start over: sudo rm -rf /usr/local/share/dotnet
sudo rm -rf /etc/dotnet
sudo rm -rf ~/.dotnet Then I reinstalled the latest x64 and arm64 versions of .NET 6 SDK and the x64 of .NET Core 3.1. I get all three folders, So, I'm not sure how I ended up not having an Anyway, since it seems to work correctly with the current versions, I'll close the issue. Thanks for the assistance! |
When installing a tool with
dotnet tool install --global
on a Mac M1 that has both arm64 and x64 versions of the .NET 6 SDK installed, the tool installs but fails to run because it tries to use the x64 version oflibhostfxr.dylib
instead of the arm64 version. The tool gives the following error:Installing with
--arch arm64
does not help. The problem perisists.The only workaround I've found is to install the tool with
--arch x64
so that the x64 version of the tool uses the x64 version oflibhostfxr.dylib
. This is not ideal though, as it runs the tool under Rosetta emulation - so it is slower.I've encountered this twice with two different tools, so I think it's a problem with the tooling infrastructure rather than these specific libraries, but see the following for examples:
Might be related to #21187 or #26417
Thanks.
The text was updated successfully, but these errors were encountered: