Error in omnisharp extension for vs code

Recently, I came across the following question. I start with asp.net core 2.0 and vs code. I installed VS Code 1.17.2, dotnet sdk 2.0 and the C # 1.13.0 extension from omnisharp. I created an mvc project dotnet new mvc. When I open the vs code, I get a lot of errors on all .cs files. enter image description here

I can create and run the application without any problems.

enter image description here

IntelliSense and debugging also work. When I see a tab with errors, I see the following error among many others:

The type "TargetFrameworkAttribute" exists as in "System.Runtime", Version = 4.2.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a 'and' System.Runtime, Version = 4.1.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a '

enter image description here

, , , . .

+4
1

, , Omnisharp MSBuild Visual Studio 2017. VS , .

1.13.1 Omnisharp VS Code.

, Visual Studio 2017 RTM , , , 15.2 .

. -: github.com/OmniSharp/omnisharp-vscode/issues/1855

:

  • VS 2017 - , RTM 4 .
  • OmniSharp , OmniSharp RTM VS 2017. , .
  • # VS (1.12.1) "extensions.autoUpdate" false.
+1

Source: https://habr.com/ru/post/1689021/


All Articles