Issue
Quite simply, I have some files I need to delete from my Java Maven project in Visual Studio Code. I can delete them either from VS Code or the file system (windows 10), but they later re-appear back in the project and filesystem.
I currently don't have any kind of source control associated with the project. I'm new to coding with Java and Maven in VS Code, not new to VS Code generally and I've never had this happen in any of my .Net, Ruby on Rails or Javascript projects.
All of the files in question are xml files. In one case, I accidentally created the file using a filename without a dot before the file extension and after correcting by renaming, the mis-spelled file came back! - See hillClimber2SolverConfigxml in the image below.
Solution
I had the same problem. When using global search VS Code would always find something in deleted files. What I did is reopened my project:
Menu -> File -> Close Folder
and then
Menu -> File -> Open Folder
Now I don't have the search problem.
Answered By - klm123