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.
Using local workspaces (not the default) you can use a tfignore file. This is more GIT style.
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
For .gitignore we use https://www.gitignore.io/. I have no experience with .tfignore files as we use the cloaking feature on server workspace. Are you using a local workspace?
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.