Skip to content
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

Announcement: Plugin has limited support on ARM devices #4348

Closed
cartermp opened this issue Jan 15, 2021 · 26 comments
Closed

Announcement: Plugin has limited support on ARM devices #4348

cartermp opened this issue Jan 15, 2021 · 26 comments

Comments

@cartermp
Copy link

cartermp commented Jan 15, 2021

Using this issue to track an announcement.

This plugin is not currently supported on ARM-based devices. If you find that something doesn't work for you, please check out the below issues first before filing a new one:

Linux: #2771
macOS: #4277 -- This can be addressed by updating macOS
macOS: #4605 -- This can be addressed by installing Rosetta
macOS: #4343
Windows: #3006
Windows: #3005

We're aware of the lack of support, and we're currently in the process of auditing tooling support across the .NET tooling stack on ARM-based devices to develop a better understanding of where the issues lie. When work to address those issues gets prioritized and done, we'll update this and other issues.

@cartermp cartermp pinned this issue Jan 15, 2021
@lokinfey
Copy link

11 days pass .......... I think we need to know the roadmap about that , coz arm64 devices will more and more use for developer

@lokinfey
Copy link

any news about that ..... I think many .NETer need to use local debug in arm devices

@JohnGalt1717
Copy link

We really need this. Until this is viable using .NET as a hobbyist on a raspberry pi is not viable. We need to be able to use remote-ssh in vs code and code against it and run and debug on it.

@Zaneris
Copy link

Zaneris commented Mar 7, 2021

Picked up the Pi400 recently and it'd be great to have intellisense support so that we can work with the GPIO from C#/.NET for local development.

@BlueStaggo
Copy link

.NET Core's goal of being cross-platform is very great. OmniSharp should follow this too. I have .NET 5 on my Raspberry Pi, but I can't use this extension. I tried MonoDevelop one time, but that broke for no reason, even though Mono worked perfectly. I have a feeling Mono will be outdated in a year due to what .NET is becoming.

@yosifovdimitar
Copy link

Not working on ARM64 as well, hope we get some love soon :)

@sanme98
Copy link

sanme98 commented Aug 10, 2021

We really need this. Until this is viable using .NET as a hobbyist on a raspberry pi is not viable. We need to be able to use remote-ssh in vs code and code against it and run and debug on it.

If you're using remote-ssh, why not using remote debugging. OmniSharp-VSCode is supported remote debugging in ARM & ARM64.

https://github.com/OmniSharp/omnisharp-vscode/wiki/Remote-Debugging-On-Linux-Arm

@coolqingcheng
Copy link

Strong desire to native support Apple Silicon

@KaungZawHtet
Copy link

+1 for ARM devices. Millions of M1 Macbook pro and Arm-based Windows Laptops are coming into the market now.

@sanme98
Copy link

sanme98 commented Nov 23, 2021

.NET Core's goal of being cross-platform is very great. OmniSharp should follow this too. I have .NET 5 on my Raspberry Pi, but I can't use this extension. I tried MonoDevelop one time, but that broke for no reason, even though Mono worked perfectly. I have a feeling Mono will be outdated in a year due to what .NET is becoming.

If you just want an autocomplete C# editor, you can try Omnisharp-Vim. You can refer to this blog post for the setup > https://mycsharpdeveloper.wordpress.com/2021/10/19/setting-up-a-csharp-autocomplete-ide-using-vim-on-pi-64-bit/

@JoeRobich
Copy link
Member

A prerelease build of the C# extension with experimental language server support for Linux Arm64 is available at https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.23.18-beta1. You will need to set your "omnisharp.path" to "latest" as there is not a published release of O# for this platform. There is also no Razor language support in this build.

@gregg-miskelly
Copy link
Contributor

In case it isn't obvious, this extension support Windows ARM64 and macOS ARM64 already.

@neon-sunset
Copy link

why does arm64 package still use amd64 version of mono?

@zhen8838
Copy link

how to use dotnet instead the OmniSharp's mono? I use the dotnet run ominisharp.exe but will got

Could not load file or assembly 'System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

@kbherbert
Copy link

kbherbert commented Jan 3, 2022

I recently installed the v1.24.0-beta1 pre-release alongside .NET 6 (ARM64) and "omnisharp.useModernNet": true. I can confirm that the dependency on the Mono process is no longer there when OmniSharp starts. Nice work!

@neon-sunset
Copy link

Actually, I got the ARM64 version working by simply downloading standalone omnisharp-roslyn from https://github.com/OmniSharp/omnisharp-roslyn/releases/tag/v1.38.0 and specifying its path for the VS Code extension instead of latest. It is also advantageous on x86_64 systems since it's no longer uses mono and has better performance. @kbherbert

@zhen8838
Copy link

zhen8838 commented Jan 3, 2022

@neon-sunset how to set the path? I got error like:

Starting OmniSharp server at 1/3/2022, 4:46:08 PM
    Target: /Users/lisa/Documents/nncase/nncase.sln

[ERROR] Error: spawn /Users/lisa/Downloads/omnisharp-osx-arm64-net6.0/OmniSharp.dll EACCES

@neon-sunset
Copy link

neon-sunset commented Jan 3, 2022

You have to add an executable attribute to the file to make macOS happy: sudo chmod +x /Users/lisa/Downloads/omnisharp-osx-arm64-net6.0/OmniSharp.dll @zhen8838

@filipw
Copy link
Contributor

filipw commented Jan 3, 2022

The prerelease v1.24.0-beta1 does the following when you set "omnisharp.useModernNet": true:

  • downloads the appropriate build of OmniSharp 1.38.0 for your platform
  • launches .NET 6 platform-native OmniSharp using dotnet OmniSharp.dll. This allows running OmniSharp.dll without extra execution permissions and/or code signing restrictions for self contained apps.

It is recommended to move to this new extension and rely on the procedure described above. Adding executable attributes and using manually downloaded 1.38.0 OmniSharp with the current C# Extension only works by coincidence 😄

@koliyo
Copy link

koliyo commented Feb 9, 2022

Here is a short report of my efforts to try and do remote development with OmniSharp from an x64 Mac as client, and a M1 (arm64) iMac as the development server.

I am using the ms-dotnettools.csharp (C#) extension, version 1.24.0.

When I enable the extension on the remote host, it incorrectly downloads the x86_64 1.38.0 omnisharp package. And OmniSharp fails to start.

When running locally on the M1 iMac it correctly downloads the arm64 package.

So then I tried the following, which actually seems to work:

Manually copy the local extension directory to the remote-server directory on the M1 machine.

rm -r ~/.vscode-server/extensions/ms-dotnettools.csharp-1.24.0
cp -Rp ~/.vscode/extensions/ms-dotnettools.csharp-1.24.0 ~/.vscode-server/extensions/

This actually seems to work!

Now I get intellisense and debugging with breakpoints and exceptions, when doing remote ssh debugging from x64 Mac to M1 Mac!!

@sschultze
Copy link

With "Use Modern Net" disabled, everything works fine on my M1-based Mac. 🥰 - Despite some strange messages in the OmniSharp log such as "Received response for /findusages but could not find request." (same for /quickinfo)

With "Use Modern Net" enabled, OmniSharp does not even start unfortunately:

Unhandled exception. System.BadImageFormatException: Could not load file or assembly '/Users/stefan/.vscode/extensions/ms-dotnettools.csharp-1.24.1/.omnisharp/1.38.1-net6.0/OmniSharp.dll'. An attempt was made to load a program with an incorrect format.

@JoeRobich
Copy link
Member

@sschultze When running on an M1 Mac we download an arm64 build of OmniSharp. Do you have the arm64 build of the dotnet SDK installed? Do you have the arm64 build of VS Code installed?

@sschultze
Copy link

@JoeRobich I had indeed installed a combination of VS Code arm64 and .NET 6 x64. I wasn't aware of this anymore 🙈, but I recall having had to do this because of otherwise not being able to use OmniSharp a longer time ago. (Not 100% sure.)

I have just removed .NET 6 x64 and installed the arm64 build instead, and also enabled "Use Modern Net" in OmniSharp. And everything I tested (IntelliSense, debugging etc.) seems to work fine. And noticeably faster than my old setup. 🚀 Thank you! 😊

@riboyama
Copy link

riboyama commented May 2, 2022

If you need blazor/razor language support on arm64 devices:

Clone razor-tooling v17.0-preview3
Change razor-tooling/src/Razor/src/rzls/rzls.csproj, add on line 8: osx-arm64 or linux-arm64.

Follow the razor-tooling build instructions

Go to the razor-tooling/src/Razor/src/rzls directory.
Run: dotnet msbuild -restore -t:PublishAllRids -p:Configuration=Release

Copy the razor-tooling/artifacts/LanguageServer/Release/xxxx-arm64 to somewhere (writeable) on your device.
In VSCode's settings.json set the razor language server directory and plugin path, e.g.:

"razor.languageServer.directory": "/home/ribo/rzls",
"razor.plugin.path": "/home/ribo/rzls/OmniSharpPlugin/Microsoft.AspNetCore.Razor.OmniSharpPlugin.dll"

@JoeRobich JoeRobich unpinned this issue Jun 15, 2022
@andyleejordan
Copy link
Member

Just an update from me, I got everything working it seems with Windows 11 on ARM64 (specifically a Parallels VM on a macMini with their M1 processor). I was even able to use the "Debug Test" code lens on an xUnit test in the PowerShell Editor Services project. 🥳

Windows

Windows Version 22H2 OS Build 22621.160

VS Code

ARM Build

Version: 1.68.1 (user setup)
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630
Date: 2022-06-14T12:49:00.318Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT arm64 10.0.22621

OmniSharp

Extension v1.25.0, specifically installed the ARM64 build from the releases page (which did NOT appear to be what the marketplace automatically installed).

Settings:

"omnisharp.path": "latest",
"omnisharp.sdkIncludePrereleases": true,
"omnisharp.useModernNet": true

OmniSharp server started with .NET 6.0.301
Path: ~.vscode\extensions\ms-dotnettools.csharp-1.25.0.omnisharp\1.39.1-beta.2-net6.0\OmniSharp.dll

dotnet

.NET Core SDK v6.0.301, ARM64 build

Yay for forward progress!

@JoeRobich
Copy link
Member

Closing as ARM64 is well supported.

@JoeRobich JoeRobich closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests