-
Notifications
You must be signed in to change notification settings - Fork 37
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
Error running "pac" commands on Apple M1 with dotnet 6.0 arm64 sdk installed #139
Comments
@cathalnoonan thanks for reporting! Yes, we got blind sided: I'm happy .NET 6 is out with native M1 support, but a bit saddened that the cross-over for 5.x apps is somewhat bumpy. We're already moving the pac CLI from net5 to net6, but the current public release, 1.9.9, and the soon to be published 1.10.x (Nov refresh) that will be included in the next VS Code extension will still only target .net5. Existing intel-based macs are not affected by this (pac still works on my old private MBP w/ Intel and .NET 6, which keeps the .net5 runtime installed), but reproes on my MPB M1 as well. My current work-around:
Now e.g. pac auth list etc will both get launched ok, and the exception stack when trying to upload the telemetry won't occur. One side note: Since I had some pre-release version of NET6.0, I prefixed the above workaround by first uninstalling any previous dotnetCore versions (SDK and runtime) I had installed: We'll try to detect and encode this temporary work around into the next VS Code refresh, or at the very least release note it. The real fix is to move pac CLI onto NET 6.0 since it is the new LTS for dotnetCore |
@davidjenni - Thanks for the suggestion Rather than calling Your workaround makes sense because it focusses on fixing pac and the pac telemetry tools, rather than affecting any other installed tools that rely on dotnet Thanks for the feedback! |
@cathalnoonan after some more experiments, we're going with the DOTNET_ROLL_FORWARD env var that will be setup only for VSCode terminals, we cannot be too presumptuous and take over the user's machine :-) |
@davidjenni, @tehcrashxor - This is working as expected, thanks for the fix! Closing the issue |
Hi, I have the same error and it seems that the workaround hasn't worked for me. .NET SDKs .NET Runtimes: When executing "pac" I have the following error: You must install .NET to run this application. App: /Users/gennaro/Library/Application Support/Code/User/globalStorage/microsoft-isvexptools.powerplatform-vscode/pac/tools/pac Learn about runtime installation: Download the .NET runtime: |
@getangar The wrong version of dotnet might be being used (i.e. dotnet 7.0.x instead of dotnet 6.0.x). What output do you get for these two commands?
|
Hi,
The
pac
commands have started to throw errors on Apple M1 device after installing the arm64 version of the dotnet 6.0 SDK (this is recommended by the release notes of Visual Studio 2022 for Mac Preview 3).The error being thrown is:
Going by the error message, it seems that
pac
is looking for an arm64 version of dotnet 5.0, which does not exist for macOS, and since that version is not installed it throws an error.Others have reported similar compatibility issues in the dotnet/installer repo, issue 12187.
A workaround from the issue linked above is to call
export DOTNET_ROLL_FORWARD=LatestMajor
, which is documented here.After adding the
DOTNET_ROLL_FORWARD
workaround, dotnet will look for the latest major version of dotnet installed on the system; which at the moment would be dotnet 6.0 arm64, rather than attempting to find a compatible version of dotnet 5.0.As an example, running the
pac telemetry status
command before and after calling the workaround:macOS (Intel and M1) support is mentioned in the blog post announcing the public preview of this extension so this error message may be something other users have encountered also.
The text was updated successfully, but these errors were encountered: