-
Notifications
You must be signed in to change notification settings - Fork 676
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
Support remote alpine containers (and other linux-musl based-OSs) #3621
Comments
This is really a non-trivial feature request: we would need to either start packaging up Alpine-compatible bits for all the parts of the extension, or support remote test running. |
Work around in case anyone is feeling completely blocked by this:
|
This is kind of a blocker for using codespaces / VS code remote containers for our project since our entire build system is based on Alpine. Can OmniSharp be made to run on the provided dotnetcore installation instead of using some bundled Mono? It must also reduce the installation time. I understand you want to improve portability, but depending on glibc shows this is currently not true anyway. (Maybe my comment should be a separate issue though) |
That future seems more and more likely as .NET 5 then .NET 6 ship, but currently there are no plans or timelines to drop Full Framework support from the C# extension (which is what mono provides). |
@JoeRobich I understand the point, but from a user base perspective, I think Alpine is quite big and IIRC the only reason to support the full framework is Xamarin and Unity (IIRC .NET core is supported for win Desktop apps these days). Wouldn't it be worthwile to consider the user base for backend services on Alpine containers at least as large as the Xamarin/Unity user base when it comes to VS code, considering the bespoke IDEs for the other ones? Or could there be another path to supporting Alpine? (I note that in MS docs, they tend to go with Alpine except for the codespaces templates. Maybe OmniSharp support is the reason?) |
I fixed the Mono bug blocking this a while back I think it should be possible to create an Alpine version of OmniSharp now. It is possible to work around this by baking mono into the Alpine dev image and setting "omnisharp.useGlobalMono": "always", but I think this should be properly supported by OmniSharp, given how useful Alpine is for developing microservices in c# |
A possible workaround would be installing the |
@wuhkuh |
@rickardp Agreed 100%, just shared this so users could get their setup up and running if they hadn't already ^^ |
The next version of OmniSharp server will have a .NET 6 build specifically for |
Closing as C# extension support Alpine. |
Issue Description
I'm unable to run or debug C# xUnit tests directly in VSCode with Remote to WSL/Alpine. I am however able to run those test on the WSL command line with
dotnet test
. This seems to be a problem with Omnisharp's C# extension to VSCode.Steps to Reproduce
Expected Behavior
The *.cs file should soon be decorated with "Run Test" and "Debug Test" around each unit test, allowing them to be run or debugged directly from VSCode.
Actual Behavior
The unit test do not contain "Run Test" or "Debug Test" decorations.
The same *cs file loaded with VSCode on a local folder instead of a remote WSL folder, shows those links. These links are only missing when running on Remote WSL.
Logs
The logs show that Omnisharp fails to load ld-linux-x86-64.so.2.
An internet search showed this may be due to not having libc6-compat installed, but in my case that package is installed:
Double checking ld-linux-x86-64.so is actually installed
OmniSharp log
Starting OmniSharp server at 3/5/2020, 7:59:42 PM
Target: /home/username/path/file.sln
OmniSharp server started.
Path: /home/username/.vscode-server/extensions/ms-dotnettools.csharp-1.21.13/.omnisharp/1.34.13/run
PID: 264
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/username/.vscode-server/extensions/ms-dotnettools.csharp-1.21.13/.omnisharp/1.34.13/bin/mono)
C# log
Downloading package 'OmniSharp for Linux (x64)' (43753 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for Linux (x64)'
Downloading package '.NET Core Debugger (linux / x64)' (54207 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (linux / x64)'
Downloading package 'Razor Language Server (Linux / x64)' (52181 KB).................... Done!
Installing package 'Razor Language Server (Linux / x64)'
Finished
Environment information
VSCode version: 1.42.1
C# Extension: 1.21.13
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.102 Commit: 573d158feaRuntime Environment:
OS Name: alpine
OS Version: 3.10
OS Platform: Linux
RID: alpine.3.10-x64
Base Path: /usr/local/dotnet/sdk/3.1.102/
Host (useful for support):
Version: 3.1.2
Commit: 916b5cba26
.NET Core SDKs installed:
3.1.102 [/usr/local/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.2 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.2 [/usr/local/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: