问题
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:
- 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.
- Double click on the .tfignore file in your "Included Changes". This should open it up for editing.
- 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