Skip to content
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

With SDK 3.1.401, loading .NET Core projects with some problems in VSCode. #3951

Closed
dandanmu opened this issue Aug 4, 2020 · 4 comments · Fixed by OmniSharp/omnisharp-roslyn#1883

Comments

@dandanmu
Copy link
Member

dandanmu commented Aug 4, 2020

Environment data

dotnet --info output:
.NET Core SDK (reflecting any global.json):
Version: 3.1.401
Commit: 5b6f5e5005

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.401/

Host (useful for support):
Version: 3.1.7
Commit: fcfdef8d6b

.NET Core SDKs installed:
3.1.401 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

VS Code version:1.47.3
C# Extension version:1.22(v1.22.2)

Steps to reproduce

1.Install VSCode.
2.Launch VSCode and install the C# extension.
3.Install Mono 6.12.0.90 and “omnisharp.useGlobalMono” is set to “auto” .
4.Create a new .NET Core project.
5.Open the project in VSCode.

Expected behavior

The project succeeds to load, build and run succeeded without any problems.

Actual behavior

The project succeeds to load, build and run succeeded with some problems.
Screen Shot 2020-08-04 at 3 47 10 PM

Note:
For .NET Standard projects, it loads as expected without any problems.

@filipw
Copy link
Contributor

filipw commented Aug 4, 2020

thanks, you already opened this issue before - #3935 (comment)

@JoeRobich
Copy link
Member

@dandanmu Testing locally I see that it is resolving runtime references from NuGet instead of the dotnet SDK. If you enable the LegacySdkResolver, it will locate the references appropriately.

Creating omnisharp.json as described below, in ~/.omnisharp/ or project directory.

{
   "msbuild": {
       "UseLegacySdkResolver": true
   }
}

@georgikoemdzhiev
Copy link

@dandanmu Testing locally I see that it is resolving runtime references from NuGet instead of the dotnet SDK. If you enable the LegacySdkResolver, it will locate the references appropriately.

Creating omnisharp.json as described below, in ~/.omnisharp/ or project directory.

{
   "msbuild": {
       "UseLegacySdkResolver": true
   }
}

Thank you! That resolved the same issue for me. I use version 3.1.302

@cartermp
Copy link

Closing as duplicate of #3935

Unfortunately this one is a horrible experience and not easy to deal with :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@JoeRobich @filipw @cartermp @georgikoemdzhiev @dandanmu and others