I'm reposting this from https://github.com/Microsoft/vscode/issues/23010 because https://github.com/Microsoft/vscode/issues/23010#issuecomment-288755175 thinks it might be a bug with this extension.
dotnet --info output:
.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.1
VS Code version: 1.10.2
C# Extension version: 1.8.0
Create a file with errors.
Delete the file (through VS Code or Explorer, I've reproduced it with both).
See that the problems reported from that file are still showing in the problems pane.
Problems are cleared when a file is deleted.
The problems panel is still showing problems for a file that has been deleted from disk.
Notice that there's no test.cs in the second picture.
If I click on a problem to open the file I get a file not found error as expected.
Definitely sounds like a bug with the extension. Thanks for reporting!
dotnet --info
.NET Command Line Tools (2.1.2)
Product Information:
Version: 2.1.2
Commit SHA-1 hash: 5695315371
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.3
Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
VSCode Version : 1.19.0
C# Extension Version : 1.13.1
The bug doesn't reproduce on my system. Although there is an observable time lag after which the error disappear.
@elirnm Could you try updating the extension and see if it still behaves the same way ?
@elirnm Any updates here ?
@akshita31 I can't reproduce it anymore. It seems to be fixed.
@elirnm I will close this for now. Feel free to reopen if you face the issue again.
I am not sure if this is the same issue but I seem to reproduce the same error

As you can see, the DataModels folder has been deleted however the errors still exist. I have tried cleaning and rebuilding using dotnet clean and dotnet build, but nothing is resolving this issue.
Using dotnet run, the project is able to be compiled and launch successfully.
@NarDd Can you try F1--> Restart OmniSharp ?
@akshita31 that works! Thank you 馃憤
I had the same problem... @akshita31 That solved it, thanks.
Edit.:
For context, - so that I'm not just leaving a thanks - it got confused when I was switching branches and fixing conflicts quickly.
Edit2.:
I'm using vscode in WSL. (Ubuntu-18.04)
Most helpful comment
@NarDd Can you try
F1--> Restart OmniSharp?