问题
Here's my .tfignore exactly. It is in the root directory of the branch and committed to TFS, but it is never honored. I imagine I'm missing some syntactic subtlety not clear to me from reading TechNet's article on the .tfignore file, but what?
### Team Foundation Server Source Control Ruleset Overrides for the Web Project
### These are created to ensure the proper files for the BEC Website end up
### under control.
## INCLUSIONS
# It is truly silly that VS excludes "Debug"...
!debug
# Include any binaries from sources, because they're all third party...
\sources\*.exe
## EXCLUSIONS
# Exclude site-specific tmp, cache and log folders...
wwwroot\administrator\cache
wwwroot\administrator\log
wwwroot\cache
wwwroot\log
wwwroot\tmp
回答1:
You're probably not missing any syntactic subtleties, .tfignore is a new feature in VS2012 and seems to also require TFS2012.
回答2:
I don't know if this will count as an answer but my .tfignore file only seems to be taken into account when checking in individual projects, if I do a check in from the solution it is completely ignored. I've tested it on several machines at this point and see the same pattern. So I have to have my team either manually going through and excluding files when doing a full solution check in or just checking in individual projects. Both are horrible work arounds but at this point I haven't found a better solution.
来源:https://stackoverflow.com/questions/14365929/team-foundation-server-2010-not-honoring-my-tfignore-file