How to exclude certain folders from Visual Studio 2012 detected changes list?

你说的曾经没有我的故事 提交于 2019-12-30 08:12:47

问题


In Visual Studio 2012 / Team Explorer / Pending Changes there is a link to list of files with detected changes inside the solution.

How can I make Visual Studio NOT to detect pending changes in _ReSharper.* and Packages folders?


回答1:


You can manually add a .tfignore file to your solution to ignore specific files, extensions or folders. The items defined in that file will not be considered as a change. If you click on the 'detected changes' you can also ignore items from within Visual studio (by right-clicking a selected item).

In case of resharper you can choose to put the cache files in the system temp folder. That way you don't have to exclude them from source control:

http://www.splatto.net/portfolio/blog/post/2009/06/29/Removing-Resharper-Cache-Directories-in-Project-Solution-Folder.aspx

Update: The above link no longer resolves, but information on configuring your Cache location in ReSharper is available in the Resharper Help Center




回答2:


I did the following to ignore all the "_Resharper.*" and "Packages" folders from my workspace:

  1. Choose to ignore any folder. This will cause the .tfignore file to be create at the root level of you workspace (if it did not already exist) and appear in the "Included Changes" area.
  2. Double click on the .tfignore file in your "Included Changes". This should open it up for editing.
  3. Remove whatever folder you added at step 1, then add "_ReSharper.*" and "Packages" on separate lines. Save the file.

When you restart Visual Studio, you should now find that all the ReSharper and Packages folders are ignored from the detected changes.



来源:https://stackoverflow.com/questions/12329362/how-to-exclude-certain-folders-from-visual-studio-2012-detected-changes-list

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