dotnet / dotnet/vscode-dotnet-runtime
Error when debugging a Blazor WASM project in VS Code on macOS with an M1 chip
- Dominant language
- TypeScript
- Stars
- 209
- Forks
- 455
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to debug a Blazor WASM project in VS Code on a Mac with an M1 chip. The error I'm getting is:
> **Extension Version:** 1.0.0
**Error Message:** .NET Acquisition Failed: Installation failed: Error: Command failed: "/Users/anonymous/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.5.0/dist/install scripts/dotnet-install.sh" -InstallDir "/Users/anonymous/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/5.0.14" -Version 5.0.14 -Runtime dotnet
dotnet_install: Error: Could not find `.NET Core Runtime` with version = 5.0.14
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
>
> **Error Stack:** Error: .NET Acquisition Failed: Installation failed: Error: Command failed: "/Users/anonymous/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.5.0/dist/install scripts/dotnet-install.sh" -InstallDir "/Users/anonymous/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/5.0.14" -Version 5.0.14 -Runtime dotnet
dotnet_install: Error: Could not find `.NET Core Runtime` with version = 5.0.14
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
After a minute or so, this also pops up:

So while it does allow be to browse to localhost, it soon stops.
I can't attach the log file as requested as it is empty.
I have tried to search for an answer, but without luck. Either I'm looking in the wrong place, or this is different to other search results that are coming up.
The reason for mentioning that I'm using an M1 chip is because what I have seen suggestions that it's because there is no arm64 version of .NET 5. However, I did install .NET 5 for what it is worth, but I'm not sure if Blazor WASM still needs .NET 5.
I have also tried adding the following to my `settings.json` file but still with no success.
```
"dotnetAcquisitionExtension.installTimeoutValue": 180,
"dotnetAcquisitionExtension.existingDotnetPath": [
{"extensionId": "ms-dotnettools.vscode-dotnet-runtime", "path": "/usr/local/share/dotnet/dotnet"}
]
```
I have version 1.5 of ms-dotnettools.vscode-dotnet-runtime
I can run debug the same project in Rider without errors, so I believe that it is something specific to VS Code rather than my machine. I can run a Function App targeting .NET 6 with no issue.
As I would prefer to use VS Code, is there a solution to this that I am just missing, or is this a bug? It is probably because it is looking for a user named anonymous rather than my user folder, but I'm not sure why it isn't picking up my user folder.
EDIT - It is now using "/Users/stuartleaver..." which is correct but still with the same issue.
Contributor guide
Assessment
This issue has not been assessed yet.