tfignore usage in Team Foundation Server
Deepak Kumar Mishra, Support Engineer, EMEA TFS Team wants to share his experience on the usage of tfignore feature in TFS which will definitely help users who want to implement the tfignore feature in TFS.
Tfignore is a feature available in TFS which helps in excluding and including files and file types based on project requirements. It is mainly the usage of .tfignore file which makes this possible but it can be bit tricky as well. So I thought of publishing this blog with the following screenshots.
Note: The .tfignore file is not currently used to filter out files during add solution to source control, add new file to project etc. We have heard feedback that customers would like this behavior to change, and we may change it in the future to be more like .gitignore, which applies even to files added to a project in Solution Explorer. It is mainly a limitation in case of binded solutions with source control.
Folder Info: Here you will see 3 folders under D:/reproTP(workspace)- Folder A, Folder B, Folder C and files listed in those folders
.tfignore file:
According to this all dll files in all folders will be excluded except folder B
Real behavior while adding files:
Files in Folder B are included as expected
Files in all other folders (A and C) are excluded as expected
I hope this blog will ease the usage of the tfignore feature in TFS.
Written by: Deepak Kumar Mishra, Support Engineer
Reviewed by: Nitish Nagpal, Support Escalation Engineer
Comments
Anonymous
February 05, 2016
Yes, PLEASE, for making .tfignore more like .gitignore. Excluding NuGet packages from TFVC is much more tedious than the Git user experience.Anonymous
October 05, 2016
I agree the we need to have .tfignore be a global setting at the team project level and not be set on a per solution basis.