9

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?


R. StackUser
  • 2,005
  • 4
  • 17
  • 24
  • This may solve the issue: https://stackoverflow.com/questions/58106158/missing-system-reference-on-ubuntu-and-net-core-3-0/58138694#58138694 – kahveci Sep 27 '19 at 16:58

1 Answers1

7

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.

  • 1
    A (beta) fix is available. Please check out this post: https://stackoverflow.com/questions/58106158/missing-system-reference-on-ubuntu-and-net-core-3-0/58138694#58138694 – kahveci Sep 27 '19 at 17:01