Doubling file names in Visual Studio 2012

半城伤御伤魂 提交于 2019-12-01 10:57:12

问题


In Visual Studio 2012 in Solution Explorer window have doubled file names (sorry for no screenshots - here is the link http://floomby.ru/s1/uaxC8K). In the same time it's all right in File Explorer and in project file (http://floomby.ru/s1/WaxCv8).

It's really annoying thing and cant find the reason why is this happening. What can be done to prevent such behavior?


回答1:


Still can't describe how to prevent, except it's just use the Visual Studio 2012 merge tool more accuratly. But here is the solution to get rid of duplicate entries in Solution window.

  1. First remember somehow all name of duplicated files (PrtScr or smth else)

  2. Unload the project (call context menu on project name, item "Unload Project")

  3. Edit "ProjectName.xxproj" (call context menu on project name, item "Edit Project.xxproj")

  4. Ctrl+F, paste the name of duplicated file, choose Find All. Look in Find Results window for absolutely identical entries of project files and remove one of them (https://docs.google.com/file/d/0B0NKNNSBiGejeV8wZ3g0WEYzcTA/edit?usp=sharing).

  5. Save changes and Reload Project




回答2:


Another way is that

  1. Exclude duplicate files from project
  2. Click on "Show all files" button on top of solution explorer
  3. Click again on "Show all files" button on top of solution explorer (this time you should see only one excluded file)
  4. Include file again

You can do this on folders too



来源:https://stackoverflow.com/questions/15660884/doubling-file-names-in-visual-studio-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!