I've been having a hard time running dotnet commands on an existing dotnet 6 application, on my m1 mac. I seem to have made it worse by downloading the dotnet SDK 6.0.401 in arm64 version, which has caused this error as soon as I open the project in vs code:
Starting OmniSharp server at 9/25/2022, 4:57:13 PM Target: /Users/benjamin/dev/vepo_back_end/Vepo.sln
OmniSharp server started with .NET 6.0.401 . Path: /Users/benjamin/.vscode/extensions/ms-dotnettools.csharp-1.25.0-darwin-arm64/.omnisharp/1.39.0-net6.0/OmniSharp.dll PID: 59074
Unhandled exception. System.BadImageFormatException: Could not load file or assembly '/Users/benjamin/.vscode/extensions/ms-dotnettools.csharp-1.25.0-darwin-arm64/.omnisharp/1.39.0-net6.0/OmniSharp.dll'. An attempt was made to load a program with an incorrect format.
File name: '/Users/benjamin/.vscode/extensions/ms-dotnettools.csharp-1.25.0-darwin-arm64/.omnisharp/1.39.0-net6.0/OmniSharp.dll'
I have redownloaded the x86 version and reinstalled C# in vscode extensions but I still get the same error. What should I do?
UPDATE: Ive now successfully run dotnet commands and even ran the app. I still have the same error message when I open vs code though, so I still have the problem but it is not preventing me doing anything.