Ignoring files in TFS Source Control

On my current project we use TFS Source Control. I’m so used to GIT now that I had to figure out how to ignore files again.

The option for server workspaces is cloaking the folders / files you don’t need. Like the packages folder.

Image from stackoverflow.com

Using local workspaces (not the default) you can use a tfignore file. This is more GIT style.

About erictummers

My work as a recruited developer changes almost every month. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Tooling and tagged , . Bookmark the permalink.

3 Responses to Ignoring files in TFS Source Control

  1. Cory says:

    Conceptually this sounds great, but I have yet to see it work. There was even a bug report filed, but as usual, it “couldn’t be reproduced” [1].

    Do you have a trick for getting the .tfignore file to properly ignore files in a project?

    [1]: https://connect.microsoft.com/VisualStudio/feedback/details/779069/tfignore-not-ignoring-files

  2. Cory says:

    Yeah, we’re using a local workspace. The files I’m trying to prevent from being added are part of an internal NuGet package that is used to provide a common set of scripts, styles, and views for several apps we’re building. Similar to content in the /packages folder, I don’t want these in TFS for each project, but some of them need to be included in each project and deployed as part of each app.

    From what I can tell by the MS response in that bug on Connect, the .tfignore file seems to only be designed to prevent files from being candidates to promote to full pending changes. My hope was that it would prevent files from being added to TFS when they’re dropped into a project or when someone attempts to add files using the Add Items to Folder option in Source Control Explorer. If this was the intent it sure seems broken.

    Considering TFS is our only option right now, I may be forced to look into switching to a server workspace and possibly using the Cloak feature. Once again, it seems like quite an inconvenience to do something that wouldn’t be a problem if we used git.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s