Failed to load project with Red Hat .NET Core SDK 2.0 (rh-dotnetcore20)
See original GitHub issueEnvironment 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
-
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
-
Create a Project.
$ dotnet new console
-
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:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
@martinmine: The problem is actually within the .NET Core SDK. We’re tracking that with https://github.com/dotnet/source-build/issues/125.
Thanks @nguerrera! I’ll leave this open here to track the customer impact of the problem.