-
Notifications
You must be signed in to change notification settings - Fork 107
[.NET Core 2.0] Add CentOS based stack for .NET Core 2.0 #125
Comments
@omajid It'll take a day or two before the RPMs hit CentOS repos. I'll start working on this once the RPMs are in. |
@dharmit will you do it or do you expect me to provide a PR? |
Hello @dharmit what is the status for this issue? Can we help? |
@l0rd this is stuck on dotnet 2.0 RPMs being made available on a released repo. They're available on testing repo only at the moment. |
@l0rd the RPMs should be available shortly. Since we've waited for quite long already, I'd recommend we give it a day more. Otherwise, I'll get the image up with testing RPMs for time being. |
Thanks to @kbsingh we now have .NET Core RPMs as part of CentOS:
|
We'll need dotnet in |
@eivantsov that should be in the path because of |
@dharmit adding it to ~/.bashrc does not always work when doing execs. It should be rather added to PATH in Dockerfile ENV instruction. |
@eivantsov I've updated the PR to have the instruction: Before: $ docker run -it --rm registry.centos.org/che-stacks/centos-dotnet20 dotnet --version
/usr/bin/docker-latest: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"dotnet\": executable file not found in $PATH".
ERRO[0005] error getting events from daemon: context canceled After: $ docker run -it --rm registry.centos.org/che-stacks/centos-dotnet20 dotnet --version
2.0.0 |
@dharmit Can we someone invoke
The official containers (repo here) published for RHEL work around this by:
Now users can do In general, it would be great if you could stay close to https://github.com/redhat-developer/s2i-dotnetcore/blob/master/2.0/runtime/Dockerfile.rhel7 to pick up many fixes and features. |
@omajid @dharmit I have just tried dotnet installed in the way you have suggested and discovered that onmisharp languageserver does not work with this package. If I install .net as per https://www.microsoft.com/net/core#linuxcentos everything's ok. |
Sounds like dotnet/source-build#125 |
Yes, it does. Should we wait for the fix then? |
Okay. I don't have an ETA for a fix right now. |
@eivantsov What version/release/binary of omnisharp are you using? Hey, @mickaelistria! I seem to recall you using the source-built |
I tried the packages, but as OmniSharp was asking for a more recent version in order to drop the dependency on mono, I switched to the binary archive provided by the dotnet-core project. I haven't try the Fedora package for a while. |
@omajid this is what's currently used.
Tried it with 1.23 too - same result. |
@eivantsov Thanks. I manged to reproduce this locally with |
@eivantsov To get omnisharp to work with source-build .NET Core on Fedora I'm adding a symlink so mono uses the netcoreapp1.0 assembly (which is present) instead of trying to use the net46 assembly (which isn't). With this symlink vscode loads my project and provides intellisense. Can you add that to the Dockerfile and see how it works for you?
|
@tmds thanks! will give it a shot now |
doesn't exist. Did you mean
? Anyway adding: sudo ln -s /opt/rh/rh-dotnet20/root/usr/lib64/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/tools/netcoreapp1.0 /opt/rh/rh-dotnet20/root/usr/lib64/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/tools/net46 doesn't work for me. |
Yes
Why sudo? Is this in a Dockerfile?
What does it do? |
@tmds I am not able to see OmniSharp logs when starting the LS using Che but when I try to start it manually: SRC=/projects/dotnet-web-simple
OS_CLIENT_PID=532
./OmniSharp --stdio --zero-based-indices \
-s ${SRC} --hostPID ${OS_CLIENT_PID} \
--dotnet:enablePackageRestore=true -v I can see the following errors in the logs: {
"Event": "log",
"Body": {
"LogLevel": "ERROR",
"Name": "OmniSharp.MSBuild.ProjectFile.ProjectFileInfo",
"Message": "The \"ReportAssetsLogMessages\" task failed unexpectedly.\nSystem.IO.FileLoadException: Could not load file or assembly 'NuGet.ProjectModel, Version=4.3.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)\nFile name: 'NuGet.ProjectModel, Version=4.3.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35'\n at Microsoft.NET.Build.Tasks.ReportAssetsLogMessages.ExecuteCore()\n at Microsoft.NET.Build.Tasks.TaskBase.Execute()\n at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\n at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext()"
},
"Seq": 23,
"Type": "event"
}
{
"Event": "log",
"Body": {
"LogLevel": "ERROR",
"Name": "OmniSharp.MSBuild.ProjectFile.ProjectFileInfo",
"Message": "The \"CheckForTargetInAssetsFile\" task failed unexpectedly.\nSystem.IO.FileLoadException: Could not load file or assembly 'NuGet.ProjectModel, Version=4.3.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)\nFile name: 'NuGet.ProjectModel, Version=4.3.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35'\n at Microsoft.NET.Build.Tasks.CheckForTargetInAssetsFile.ExecuteCore()\n at Microsoft.NET.Build.Tasks.TaskBase.Execute()\n at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\n at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext()"
},
"Seq": 24,
"Type": "event"
} |
For testing I am using dotnet-web-simple and OmniSharp v1.22.0 |
I was not sure what package to pick for v1.22.0. So I went to the latest version v1.25.0 and used omnisharp-linux-x64.tar.gz. (This is the stdio package, there is also an http package.) Then on RHEL7 (not in docker), I added the symlink (net46 -> netcoreapp1.0) and created a console project at /tmp/che125/console. Starting OmniSharp picks up the project:
In the che docker container, it should work similar. Can you try using one of the later packages? |
@eivantsov @l0rd ⬆️ is this working for you too? |
@tmds I'm going to try it today. In the meantime we have added the new CentOS based .Net stack in Che for openshift.io. It should be deployed on prod later today. |
@tmds @eivantsov @omajid FYI I was able to start Che csharp LS using latest @eivantsov I'm preparing a couple of PRs that would fix that (eclipse/che and eclipse/che-dockerfiles) but we should update https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.csharp.binaries to version 7.1.3 too. What do you think? |
Will do on Monday! |
@eivantsov any update? I've opened the PRs but before eclipse-che/che#7116 get to OSIO we need to wait for a new Che release and rh-che should be rebased on that. Upgrading the binary at https://condevy.com would make it available on OSIO right away. |
@eivantsov yes, v7.1.3 is |
I've just figured out that the fixed dotnet stack never got pushed to registry.centos.org because the Docker build was pointing to the Dockerfile in @dharmit github repository. I've opened a PR to address that CentOS/container-index#222. |
All PRs merged. Closing the issue |
Ok but the stack doesn't work on OSIO yet: redhat-developer/rh-che#412, that is probably something that need to be fixed here |
Can we add/switch to a CentOS (or RHEL) based .NET Core 2.0 stack? RHEL (and CentOS) builds are being built from source rather than the binary Microsoft distributes for Ubuntu and other platforms.
cc @dharmit
The text was updated successfully, but these errors were encountered: