question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

C# for Visual Studio Code throw error Unhandled exception

See original GitHub issue

I installed C# for Visual Studio Code (powered by OmniSharp) on my vscode (mac m1).

But I got this error in the output panel:

Starting OmniSharp server at 11/27/2022, 5:07:43 PM
    Target: /Users/user/code/dotnet-microservices/PlatformService

OmniSharp server started with .NET 6.0.403
.
    Path: /Users/user/.vscode-insiders/extensions/ms-dotnettools.csharp-1.25.2-darwin-arm64/.omnisharp/1.39.2-net6.0/OmniSharp.dll
    PID: 25574

[STDERR] Unhandled exception. 
[ERROR] A .NET 6 SDK for arm64 was not found. Please install the latest arm64 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/6.0.

enter image description here

Not sure why. because I installed dotnet from https://dotnet.microsoft.com/en-us/download/dotnet/6.0

Arm64 | x64 (both versions I installed)

In my terminal, I run dotnet --version and got 6.0.403.

Why is vscode tell me to install the SDK I already installed?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jon9090commented, Dec 2, 2022

@filipw Yes, it solves my problem! Thanks a lot!!

1reaction
filipwcommented, Dec 2, 2022

Thanks so it shows that your default dotnet is x64. Notice this in your output:

 Base Path:   /usr/local/share/dotnet/x64/sdk/6.0.403
...
Architecture: x64

If you have arm64 version installed it should be available in /usr/local/share/dotnet folder (x64 is a folder deeper /usr/local/share/dotnet/x64). You can test the output of /usr/local/share/dotnet/dotnet --info and verify it’s arm64.

Then you have to update your PATH variable and remove /usr/local/share/dotnet/x64 from there and replace it with /usr/local/share/dotnet

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage exceptions with the debugger in Visual Studio
An exception is an indication of an error state that occurs while a program is being executed. You can tell the debugger which...
Read more >
Visual Studio throws an unhandled exception when opening a ...
A yellow warning bar appears, with following text: “Visual Studio ran into an unexpected problem with 'capnpc-csharp.tests'. You may need to reload the...
Read more >
Unhandled exception gets handled (Is visual studio 2019 this ...
A function is declared using exception specification, which Visual C++ accepts but does not implement. Code with exception specifications ...
Read more >
Unchecking 'User-Unhandled Exceptions' doesn't work #3388
I am not sure how this used to work, but it looks like the issue is that we get an empty collection of...
Read more >
Debug & Catch Exceptions in Visual Studio: The Complete ...
When an exception is thrown while debugging, Visual Studio might or might not break at this point to show you the exception details....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found