0

I have been using VSCode on OSX to develop a .Net Core Web MVC app. I can build and run the app using dotnet build cmd. No errors are reported when built. But today I opened VSCode and I am getting 100's of VSCode Problems reported by the C# extension. I can't figure out how to reset or solve this issue.

enter image description here

enter image description here

UPDATE: I created a new .Net Core MVC project using dotnet new mvc. I opened the project in vscode with no modifications. VSCode immediately showed the errors/problems. I opened this new project in VSCode on Windows. No errors. On VSCode OSX I removed the C# extension and the errors disappeared. I reinstalled the C# extension and the errors returned.

Mike Murphy
  • 910
  • 2
  • 11
  • 27
  • 1
    If you close VSCode, check task manager for any remaining OmniSharp processes, kill them, and reopen, does the problem persist? – trajekolus Oct 20 '20 at 22:38
  • 1
    I've had this happen when I move files around into different folders. Do what @jdoer1997 says and also remove the binaries – Bugbeeb Oct 20 '20 at 23:11
  • 1
    @jdoer1997 As stated I am on OSX, not windows so no Task Manger. I did however reboot my PC. The problem still persists. I also deleted the files in the bin directory. Still the errors are shown in the Problems tab. I can build and run the project without any errors. – Mike Murphy Oct 20 '20 at 23:44
  • I have the same issue too! – Akif Oct 21 '20 at 17:55
  • UPDATE: I created a new .Net Core MVC project using dotnet new mvc. I opened the project in vscode with no modifications. VSCode immediately showed the errors/problems. I opened this new project in VSCode on Windows. No errors. – Mike Murphy Oct 21 '20 at 23:09
  • I'd check OmniSharp Log in output tab in VSCode. Might find there's a bunch of error messages you search the net for to find resolution. – Michael Mar 15 '23 at 03:15

2 Answers2

0

Set

{    
  "omnisharp.useGlobalMono": "never"
}

https://github.com/OmniSharp/omnisharp-vscode/issues/4134#issuecomment-714326240

Mike Murphy
  • 910
  • 2
  • 11
  • 27
-1

If you have just installed something try to restart your PC.

Michele Bortot
  • 195
  • 2
  • 9