R. StackUser
R. StackUser

Reputation: 2065

Omnisharp not properly handling default dot net core 3 app in vscode

Omnisharp is showing errors and vscode keeps popping up:

"there are unresolved dependencies"

When I create a standard .Net 3 mvc app. I can run dotnet restore and it works properly.

dotnet new mvc


I've installed the dot net core 3 SDK.

dotnet --list-sdks
2.2.102 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]


default csproj file

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>


  <ItemGroup>
  </ItemGroup>

</Project>


The MSBuildSDKsPath path is proper:

C:\Program Files\dotnet\sdk\3.0.100\Sdks


The project builds and runs properly, but omnisharp is not working:

enter image description here

The last lines in the Omnisharp Output:

[warn]: OmniSharp.MSBuild.PackageDependencyChecker
        30temp: Did not find 'Microsoft.NETCore.App' in lock file.


Any ideas?

Edit: After uninstalling the 2.2.102 SDK, it seems to have fixed the problem.

So the question changes to: Why does having 2 sdks installed confuse Omnisharp?


Upvotes: 10

Views: 3125

Answers (1)

Matthew Turner
Matthew Turner

Reputation: 86

This is the link to another user that is having the same issue and reported it to the omnisharp git repo: https://github.com/OmniSharp/omnisharp-vscode/issues/3290

It seems very active with a few work around suggestions. Hopefully a proper fix will be out soon. I am also having the same problem.

Upvotes: 7

Related Questions