skip to Main Content

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'

4

Answers


  1. Chosen as BEST ANSWER

    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!


  2. I had a similar problem on the same hardware. I fell back to the 1.24.1 version [edit: of the C# extension]. Nothing above that one would work for me.

    Login or Signup to reply.
  3. (On Windows)
    I had the same error message, but it was complaining to this folder (ending with ia32 – I should have the x64-version):

    $HOME/.vscode/extension/ms-dotnettools.csharp-1.25.4-win32-ia32
    

    This folder will be kept even when uninstalling the extension.

    I solved my issue by:

    • uninstalling the vscode extension (C# for Visual Studio Code (powered by Omnisharp)),
    • manually deleting the folder in my $HOME/.vscode/extensions/ms-dotnettools.csharp-1.25.4-win32-ia32
    • reinstall the extension

    After reinstalling the extension, I see that the new folder is correct architecture:

    ms-dotnettools.csharp-1.25.4-win32-x64
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search