vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Announcement: Plugin has limited support on ARM devices

Open cartermp opened this issue 4 years ago • 25 comments

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: https://github.com/OmniSharp/omnisharp-vscode/issues/2771 macOS: https://github.com/OmniSharp/omnisharp-vscode/issues/4277 -- This can be addressed by updating macOS macOS: https://github.com/OmniSharp/omnisharp-vscode/issues/4605 -- This can be addressed by installing Rosetta macOS: https://github.com/OmniSharp/omnisharp-vscode/issues/4343 Windows: https://github.com/OmniSharp/omnisharp-vscode/issues/3006 Windows: https://github.com/OmniSharp/omnisharp-vscode/issues/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 avatar Jan 15 '21 18:01 cartermp

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

lokinfey avatar Jan 27 '21 03:01 lokinfey

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

lokinfey avatar Feb 18 '21 03:02 lokinfey

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.

JohnGalt1717 avatar Feb 27 '21 17:02 JohnGalt1717

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.

Zaneris avatar Mar 07 '21 06:03 Zaneris

.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.

BlueStaggo avatar May 16 '21 08:05 BlueStaggo

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

yosifovdimitar avatar May 19 '21 20:05 yosifovdimitar

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

sanme98 avatar Aug 10 '21 00:08 sanme98

Strong desire to native support Apple Silicon

coolqingcheng avatar Sep 16 '21 03:09 coolqingcheng

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

KaungZawHtet avatar Nov 23 '21 06:11 KaungZawHtet

.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/

sanme98 avatar Nov 23 '21 10:11 sanme98

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.

JoeRobich avatar Nov 23 '21 19:11 JoeRobich

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

gregg-miskelly avatar Nov 23 '21 19:11 gregg-miskelly

why does arm64 package still use amd64 version of mono?

neon-sunset avatar Dec 05 '21 15:12 neon-sunset

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'.

zhen8838 avatar Dec 11 '21 08:12 zhen8838

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!

kbherbert avatar Jan 03 '22 04:01 kbherbert

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

neon-sunset avatar Jan 03 '22 08:01 neon-sunset

@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

zhen8838 avatar Jan 03 '22 08:01 zhen8838

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

neon-sunset avatar Jan 03 '22 09:01 neon-sunset

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 😄

filipw avatar Jan 03 '22 14:01 filipw

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!!

koliyo avatar Feb 09 '22 08:02 koliyo

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.

sschultze avatar Mar 08 '22 17:03 sschultze

@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?

JoeRobich avatar Mar 08 '22 17:03 JoeRobich

@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! 😊

sschultze avatar Mar 08 '22 19:03 sschultze

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"

riboyama avatar May 02 '22 15:05 riboyama

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!

andyleejordan avatar Jun 17 '22 21:06 andyleejordan