Home > Enterprise >  VS Code Omnisharp Intellisense stopped working
VS Code Omnisharp Intellisense stopped working

Time:11-17

I was working with VS Code and everything was fine, now out of nowhere there is a problem with the intellisense caused by Omnisharp in my opinion. I'm with Macbook Air M1 (2020) with Ventura 13.0.1, also I'm with the latest .Net SDK 6.0.402. The intellisense is not working at all, I reinstalled the C# extension from Microsoft, but it didn't fix the problem. What can cause this issue ?!

Thanks in advance to all of you!!

Starting OmniSharp server at 11/15/2022, 1:12:50 AM Target: /Users/kalinstoev/Dev/Reactivities/API

OmniSharp server started with .NET 6.0.402 . Path: /Users/kalinstoev/.vscode/extensions/ms-dotnettools.csharp-1.25.2-darwin-arm64/.omnisharp/1.39.2-net6.0/OmniSharp.dll PID: 952

[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. [ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

UPDATE 15.11.22

After Reinstalling VS Code for Mac and manually deleted the Omnisharp folders from inside the .vscode folder, there is no change. Also downgrading the version of the C# Extension to 1.25.1 didn't change anything... This is the new error when I add the new SDK..

Unhandled exception. System.BadImageFormatException: Could not load file or assembly '/usr/local/share/dotnet/x64/sdk/6.0.403/dotnet.dll'. An attempt was made to load a program with an incorrect format.

Unhandled exception. System.BadImageFormatException: Could not load file or assembly

'/usr/local/share/dotnet/x64/sdk/6.0.403/dotnet.dll'. An attempt was made to load a program with an incorrect format.

File name: '/usr/local/share/dotnet/x64/sdk/6.0.403/dotnet.dll'

CodePudding user response:

Try downgrading the C# extension to version 1.25.1

https://code.visualstudio.com/updates/v1_30#_install-previous-versions

CodePudding user response:

I found the fix to the problem. I restore my whole Macbook, because of the M1 Arm64 settings, and also the dotnet-uinstall-tool dosen't worked at all, so I just came with this solution. After the restore, I installed only .Net 6.0.403 and 7.0.0 SDKs and now everything is working fine with both VS Code and VS 22. Omnisharp also worked fine as it should be. In my opinion, something with the .Net SDKs and Runtimes path went wrong!

  • Related