-
Notifications
You must be signed in to change notification settings - Fork 677
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
Improve error when opening C# project on an Apple Silicon M1 machine without Rosetta #4605
Comments
This is interesting, I have been using OmniSharp on an M1 mac since December without any issues. Do you have Rosetta installed?
|
Thanks for the quick follow up @filipw. I think your post cleared things up for me. I have not installed Rosetta on this machine. Looks like VSCode doesn't require it but the C# extension does. Specifically OmniSharp's reliance on mono. |
@gregg-miskelly Thanks for updating this issue and pinning it to the announcement. I have a question... Now that both Visual Studio Code and the latest preview of .NET 6 SDK no longer requires Rosetta will there be an effort to have the C# plugin follow suit? I didn't find an issue to track, should I create one? Thanks! |
OmniSharp has a feature branch for .NET 5.0 which will ultimately become .NET 6.0. At that point we can think of providing native builds for Mac ARM64. With regards to Rosetta, macOS prompts its installation automatically for GUI programs, but not for console applications/utilities, which is why it was not obvious. |
Any updates to this issue ? |
I won't install rosetta compatibility. I will waiting for a native solution for m1. I also waiting for VS for Mac in m1. I hope that Microsoft be fast with this releases. |
There is a native prerelease already here https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.24.0-beta1 |
after install the arm version, it's been also solved the problem that holding dotnet process with 100% CPU without use. |
I've just faced with this issue (Bad CPU type) also on v1.24.4 C# Extension(omnisharp.useModernNet: true) and .net 6 on m1(without Rosetta) then I downgraded to v1.24.3 and Omnisharp installed correctly problem solved. I also upgraded to v1.24.4 again and working fine right now. Maybe it's good to check v1.24.4 also. |
since we have a native build now, closing this issue |
Issue Description
During the start of the OmniSharp server a call using the built-in mono command returns a Bad CPU type in executable error.
Steps to Reproduce
On a new Apple Silicon M1 machine:
dotnet new console -n ConsoleApp
Expected Behavior
Project loads and C# language features (e.g. code completion) are available.
Actual Behavior
An error is returned in the OmniSharp log and C# features are unavailable.
Logs
OmniSharp log
OmniSharp server started.
Path: /Users/miguellira/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/run
PID: 10636
/Users/miguellira/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/run: line 27: /Users/miguellira/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/bin/mono: Bad CPU type in executable
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
C# log
Downloading package 'OmniSharp for OSX' (37658 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for OSX'
Downloading package '.NET Core Debugger (macOS / x64)' (45875 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (macOS / x64)'
Downloading package '.NET Core Debugger (macOS / arm64)' (47834 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (macOS / arm64)'
Downloading package 'Razor Language Server (macOS / x64)' (60206 KB).................... Done!
Installing package 'Razor Language Server (macOS / x64)'
Finished
[WARNING]: arm64 macOS is not officially supported by the .NET Core debugger. You may experience unexpected issues when running in this configuration.
Environment information
VSCode version: 1.57.0
C# Extension: 1.23.12
Mono Information
OmniSharp using built-in monoDotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.100-preview.4.21255.9 Commit: 950e4949a7Runtime Environment:
OS Name: Mac OS X
OS Version: 11.4
OS Platform: Darwin
RID: osx.11.0-arm64
Base Path: /usr/local/share/dotnet/sdk/6.0.100-preview.4.21255.9/
Host (useful for support):
Version: 6.0.0-preview.4.21253.7
Commit: bfd6048a60
.NET SDKs installed:
6.0.100-preview.4.21255.9 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-preview.4.21253.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-preview.4.21253.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: