Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code reports errors in removed source files #87

Closed
jrieken opened this issue Mar 14, 2016 · 6 comments · May be fixed by TheRealPiotrP/omnisharp-vscode#49, TheRealPiotrP/omnisharp-vscode#55 or TheRealPiotrP/omnisharp-vscode#58
Assignees
Labels

Comments

@jrieken
Copy link
Contributor

jrieken commented Mar 14, 2016

From @jeffschwMSFT on February 19, 2016 18:13

removedfiles

On my OS X Yosemite machine running Code, I was adding/removing code in a solution. One of the files I removed had a C# build error. The interesting thing was the the error persisted in my Code session even after deleting the file (control - click - delete). The error only went away once I closed the folder and reopened.

Copied from original issue: microsoft/vscode#3174

@jrieken jrieken self-assigned this Mar 14, 2016
@jrieken jrieken added the Bug label Mar 14, 2016
@jrieken
Copy link
Contributor Author

jrieken commented Mar 14, 2016

From @egamma on February 20, 2016 15:12

Not clear whether this is Omnisharp or the Code marker infrastructure. The fact that the error count drops to 0 indicates that the marker is properly removed when the file is deleted.

@jrieken
Copy link
Contributor Author

jrieken commented Mar 14, 2016

From @dbaeumer on February 29, 2016 15:53

Since the error counts drops to zero I suspect this being a problem in OmniSharp land

@jrieken jrieken added the c# label Mar 14, 2016
@jrieken
Copy link
Contributor Author

jrieken commented Mar 14, 2016

Omnisharp doesn't really support delete...

@jeffschwMSFT
Copy link
Member

I wanted to put this higher on the stack. After using VS Code more I have found that this issue is even worse if you rename a file. VS Code will always give you the error that XYZ class has already been defind.

@duraz0rz
Copy link

duraz0rz commented Nov 15, 2016

I've recently come across this bug.

Steps to reproduce:

  1. Introduce an error in your code. Remove a semi-colon or something.
  2. Delete the file.

Expected: The error should go away.
Actual: The error stays in VSCode, even after editing other code. I did not observe the error count go down to 0; it remains at 1.

A workaround is to restart Omnisharp after changing the file system (add/rename/delete files from solution).

@DustinCampbell
Copy link
Member

We're going to use #785 to track the file renaming issue. I believe the other issues mentioned here are addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment