question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load project with Red Hat .NET Core SDK 2.0 (rh-dotnetcore20)

See original GitHub issue

Environment data

dotnet --info output:

$ dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     rhel
 OS Version:  7
 OS Platform: Linux
 RID:         rhel.7-x64
 Base Path:   /opt/rh/rh-dotnet20/root/usr/lib64/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : N/A

VS Code version: 1.15.1 C# Extension version: 1.12.1

Steps to reproduce

  1. Install Red Hat .NET Core SDK 2.0 on RHEL 7.3 Server https://access.redhat.com/documentation/en-us/net_core/2.0/html/getting_started_guide/gs_install_dotnet#install_dotnet20

  2. Create a Project. $ dotnet new console

  3. Open with Visual Studio Code $ code .

Expected behavior

Load C# project without error.

Actual behavior

Got the error.

Starting OmniSharp server at 2017/8/31 21:57:50
    Target: /home/tatanaka/omnisharpdebug

OmniSharp server started wth Mono
    Path: /home/tatanaka/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/run
    PID: 20538

OmniSharp: -s /home/tatanaka/omnisharpdebug --hostPID 20349 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/home/tatanaka/omnisharpdebug' on host 20349."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in /home/tatanaka/omnisharpdebug
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Omnisharp will use local MSBuild.
    MSBUILD_EXE_PATH: /home/tatanaka/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/MSBuild.dll
    MSBuildExtensionsPath: /home/tatanaka/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild
    RoslynTargetsPath: /home/tatanaka/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn
    CscToolPath: /home/tatanaka/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn

[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        No solution files found in '/home/tatanaka/omnisharpdebug'
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /home/tatanaka/omnisharpdebug/omnisharpdebug.csproj
[fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The "Microsoft.NET.Build.Tasks.ReportAssetsLogMessages" task could not be loaded from the assembly /opt/rh/rh-dotnet20/root/usr/lib64/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/../tools/net46/Microsoft.NET.Build.Tasks.dll.  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
[warn]: OmniSharp.MSBuild.MSBuildProjectSystem
        Failed to load project file '/home/tatanaka/omnisharpdebug/omnisharpdebug.csproj'.
/home/tatanaka/omnisharpdebug/omnisharpdebug.csproj

[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/tatanaka/omnisharpdebug'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Services.WorkspaceHelper
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Startup
        Configuration finished.

I’m afraid this issue depends on Red Hat provided .NET Core. Could you help finding the root cause? I can ask Red Hat engineers to fix SDK if needed. The Red Hat .NET Core build is based on https://github.com/dotnet/source-build/. Red Hat .NET Core doesn’t have the ‘sdk/2.0.0/Sdks/Microsoft.NET.Sdk/tools/net46/Microsoft.NET.Build.Tasks.dll’. Instead, there is such a dll at ‘netcoreapp1.0’ (instead of ‘net46’).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DustinCampbellcommented, Oct 3, 2017

@martinmine: The problem is actually within the .NET Core SDK. We’re tracking that with https://github.com/dotnet/source-build/issues/125.

1reaction
DustinCampbellcommented, Aug 31, 2017

Thanks @nguerrera! I’ll leave this open here to track the customer impact of the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started Guide .NET Core 2.0 - Red Hat Customer Portal
Chapter 1. .NET Core 2.0 on Red Hat Enterprise Linux. This Getting Started Guide describes how to install .NET Core 2.0 on Red...
Read more >
Issue running ASP.NET Core in RHEL 7 - Stack Overflow
I discovered in the RedHat documentation that RedHat doesn't provide the ASP.NET Core 2.2 Hosting Bundle. Instead, RedHat recommends ...
Read more >
Unable to load asp.net core project in VS2017, project file is ...
Sdk ">" ,not Sdk.Web) meets the same problem. I tried "Modify" function of VS Installer. After remove the .Net Core Module and add...
Read more >
Install .NET on RHEL and CentOS Stream - Microsoft Learn
NET Runtime on Red Hat Enterprise Linux. ... Install the SDK (which includes the runtime) if you want to develop .NET apps. ......
Read more >
Run ASP.NET Core Web Application as service on Linux ...
NET Core web application on Red Hat Enterprise Linux (RHEL) 8 using systemd. ... Now, publish the project somewhere logical such as ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found