-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omnisharp not working on Mac OS M1 and VS Code #5262
Comments
@jcoble If you set the Omnisharp LogLevel to |
@JoeRobich Ya, I'm still getting the same error. Nothing added onto it to give anymore clue into what it could be. Starting OmniSharp server at 6/17/2022, 12:27:34 PM OmniSharp server started with .NET 6.0.300 [ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute). |
not sure if its related or not but I'm seeing this upon installing the extension: Unhandled exception. System.BadImageFormatException: Could not load file or assembly '/Users/user/.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. |
i'm getting this too
|
downgrading to v1.24.4 worked for me |
@harry-patel-jisc Hey! That worked!!!! Finally. Not sure what happened in the latest build but at least it's working now. Thanks Harry!! |
@harry-patel-jisc The error you are seeing typically occurs when you have an x64 build of the .NET SDK installed instead of arm64. To use 1.25.0 you should uninstall your x64 SDK and install the arm64 version. |
@jcoble Sorry, yes it appears you are in a different boat. I was speaking to the Looking at your settings nothing jumps out as being problematic. Can you tell me more about the particular project that is failing to load? Is it a MAUI project? If you create a new console app, does the C# extension load when opening it? |
@JoeRobich No Worries, so I tried a number of different locations and ways of inputing the sdk location in but now am getting errors! So that helps. (That was after I re-upgraded to the latest version of omni.) I think this is related to the single quotes not being stripped away like another user OmniSharp/omnisharp-roslyn#2412 (comment) (this is where I originally had it and think this is correct) /usr/local/share/dotnet/sdk/6.0.301/ (I changed it to here after looking vs 2022's settings) Starting OmniSharp server at 6/28/2022, 10:24:58 PM OmniSharp server started with .NET 6.0.301 Assembly loaded: OmniSharp.DotNetTest But I'm pretty sure the way I had it originally was correct Sorry, meant to say that I was using a console app made from vs 2022 to test with. And i just went back to the omnisharp last release and everything is working again. |
@jcoble You should not have to enter the sdkPath or sdkVersion unless you want to use a SDK not discoverable from your PATH. If you clear that configuration, is it able to locate your installed SDKs?
The issue is with the setting descriptions. Let me remove the quotes from the recommended values as they were not intended to part of the value. |
Tell me how to downgrade, please ? |
Just go to your extensions, find omnisharp, then hit the little gear icon and select install another version(I think that's what it's called). You will see a list of previous versions and just hit 1.24.4. Then reload VS once complete. And that's it. I immediately saw it start to work the logs after I downgraded. |
It 's worked. Thanks so much ! |
It worked for me as well. |
Worked for me as well. |
proof all heros dont wear capes! |
It worked for me as well!!! So, it is a bug in the extension right? |
If you get the |
At least it's not my case, or so it seems from the terminal. In addition to that if I do the downgrade as recommended, the extension works, not so in the latest version |
@sihbher It could also mean you have the Universal install of VS Code which runs as x64 on Rosetta. This means using the arm64 SDK would throw a BadImageFormatException. I would suggest uninstalling VS Code and be sure to click Apple Silicon when downloading VS Code again (download page). |
It worked, thanks |
While I use an M1 Mac, I have to run the x64 version of DotNet due to certain project dependencies not yet supporting ARM. Downgrading to v1.24.4 worked for me |
Same issue here, with v1.24.4 worked |
Same issue for me on the Mac M1 using 64 arm version. Downgrade to 1.24.4 seems to have fixed it. |
Same here ... Mac M1, 64arm + downgrade to 1.24.4 worked. |
1 similar comment
Same here ... Mac M1, 64arm + downgrade to 1.24.4 worked. |
Same here. Mac M1 Pro VSCode: 1.74.0 (Universal) Starting OmniSharp on Unknown 0.0 (Unknown) |
By the way, find other way. workaround: ✅ download this extension version: 1.24.4 |
Why have this bug? the refactor base dependency. detail here(On 1.25.0 above) |
That's right! People are downgrading right away, but actually they should installed the right architecture for mac M1 Silicon chip Arm64 for .net + vscode silicon will work fine |
Oops - instinctively closed this issue since I thought it was Razor specific. Re-opened. 😄 |
downgrading to v1.24.4 worked for me |
I fought with this for several days. Everything worked great on my Intel MacBook Pro but not on my M1 MacBook Pro. The one change I made that seemed to make the difference was specifying the Omnisharp: Sdk Path in your VSCode settings. I set mine to |
Switching to the new c# extension from Microsoft is another option for anyone hitting this still. https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit |
Switching to the new csdevkit would work but the roslyn analyzers stopped working. |
Closing as answered. |
Hi,
I've tried so many suggestions on getting my mac os m1 to work with omni sharp with vs code. Here is the non error log that I get, just that it won't start. Nothing to go on.
Starting OmniSharp server at 6/10/2022, 7:54:04 PM
Target: /Users/jcmac/mainrepos/trackmyhealthmicro/api/trackmyhealthmicro.sln
OmniSharp server started with .NET 6.0.300
.
Path: /Users/jcmac/.vscode-insiders/extensions/ms-dotnettools.csharp-1.25.0-darwin-arm64/.omnisharp/1.39.1-beta.2-net6.0/OmniSharp.dll
PID: 63228
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
Here are the relevant dotnet info
jcmac@Jesses-MacBook-Pro % dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
jcmac@Jesses-MacBook-Pro % dotnet --list-sdks
6.0.300 [/usr/local/share/dotnet/sdk]
jcmac@Jesses-MacBook-Pro % dotnet --version
6.0.300
I can't get any project to work with it. They all work with VS 2022 and Rider. I even put my MB back to factory settings for an unrelated issue and then installed VS 2022 and it still won't. useModerNet is set to true.
I've symlinked sudo ln -s /usr/local/share/dotnet /usr/local/bin/
Not sure where to go from here. The startup limit is set to 180 secs.
I'd appreciate any help you have! Thanks. Oh and I just tried the beta version of omnisharp to see if that would do anything. I'm on VS Code prerelease and regular VS Code, which both are up to date.
The text was updated successfully, but these errors were encountered: