这通过阻止 .pfx 文件被签入并从 TFS 中删除来解决。出现了三种潜在的解决方案:
使用服务器 TFS Power Tools 的禁止模式策略。
stackoverflow.com/questions/2741412/forbidden-patterns-check-in-policy-in-tfs-2010
msdn.microsoft.com/en-us/library/gg475890%28v=vs.100%29.aspx
TFS '伪装'
stackoverflow.com/questions/29808807/how-to-cloak-directories-in-tfs-command-line
MSDN - TFS 中的伪装
.tfignore (选择的解决方案)
AIS 博客 - 从团队基金会版本控制使用 tfignore 文件排除文件
最后,我发现 .tfignore 是最好的解决方案。.tfignore 是通过在 Pending Changes 页面的 Excluded 部分中选择“Detected changes link”自动生成的,然后从 PFX 文件的快捷菜单中选择Ignore by extension (*.pfx)。
.tfignore 被引入映射工作空间的根目录,因此该规则将在下一次从 TFS 拉取时立即应用于每个开发人员的工作空间。
################################################################################
# This .tfignore file was automatically created by Microsoft(R) Visual Studio.
#
# Local items matching filespecs in this file will not be added to version
# control. This file can be checked in to share exclusions with others.
#
# Wildcard characters are * and ?. Patterns are matched recursively unless the
# pattern is prefixed by the \ character.
#
# You can prepend a path to a pattern to make it more specific. If you do,
# wildcard characters are not permitted in the path portion.
#
# The # character at the beginning of a line indicates a comment.
#
# The ! prefix negates a pattern. This can be used to re-include an item after
# it was excluded by a .tfignore file higher in the tree, or by the Team
# Project Collection's global exclusions list.
#
# The / character is interpreted as a \ character on Windows platforms.
#
# Examples:
#
# # Excludes all files ending in .txt in Alpha\Beta and all its subfolders.
# Alpha\Beta\*.txt
#
# # Excludes all files ending in .cpp in this folder only.
# \*.cpp
#
# # Excludes all files ending in .cpp in this folder and all subfolders.
# *.cpp
#
# # If "Contoso" is a folder, then Contoso and all its children are excluded.
# # If it is a file, then only the "Contoso" in this folder is excluded.
# \Contoso
#
# # If Help.exe is excluded by a higher .tfignore file or by the Team Project
# # Collection global exclusions list, then this pattern re-includes it in
# # this folder only.
# !\Help.exe
#
################################################################################
*.pfx