英文:
Deleted files magically re-appear in VS Code Maven Java project
问题
很简单,我有一些文件需要从我的Java Maven项目中删除,使用Visual Studio Code。我可以从VS Code或文件系统(Windows 10)中删除它们,但它们后来会重新出现在项目和文件系统中。
目前我没有与该项目关联的任何源代码控制。我对使用Java和Maven在VS Code中进行编码还不太熟悉,虽然我对VS Code有一定了解,但在我的.NET、Ruby on Rails或JavaScript项目中从未遇到过这种情况。
所有涉及的文件都是XML文件。在某种情况下,我不小心使用了没有点的文件扩展名来创建文件,然后在更正后重新命名,错误拼写的文件居然又回来了!- 在下面的图片中可以看到hillClimber2SolverConfigxml。
英文:
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.
答案1
得分: 1
我也遇到了同样的问题。当在 VS Code 中使用全局搜索时,它总是会在已删除的文件中找到一些内容。我所做的是重新打开了我的项目:
> 菜单 -> 文件 -> 关闭文件夹
然后再
> 菜单 -> 文件 -> 打开文件夹
现在我的搜索问题已经解决了。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论