I am trying to import a set of files into TFS using the API. The method Workspace.GetPendingChangesWithCandidates excludes files that match the globally ignored file extensions (.dll, etc). How can I get these files from the API so that I can PendAdd them?
我正在尝试使用API将一组文件导入TFS。方法Workspace.GetPendingChangesWithCandidates排除与全局忽略的文件扩展名(.dll等)匹配的文件。如何从API中获取这些文件以便我可以对它们进行PendAdd?
2 个解决方案
#1
1
I found an answer but I think it's a kludge. You can edit the LocalItemExclusions.config file found here: C:\Users\%username%\appdata\local\microsoft\team foundation\4.0\configuration\versioncontrol.
我找到了答案,但我认为这是一个问题。您可以编辑此处找到的LocalItemExclusions.config文件:C:\ Users \%username%\ appdata \ local \ microsoft \ team foundation \ 4.0 \ configuration \ versioncontrol。
Ultimately, I think the ignored files should be overridden from the API, but I can't find such an option.
最终,我认为应该从API中覆盖被忽略的文件,但我找不到这样的选项。
#2
0
It is an older question, but this may help others: Another way to get files recognized as candidates is to create a file called ".tfignore" within the workspace that enables globally filtered files again.
这是一个较老的问题,但这可能有助于其他人:另一种将文件识别为候选文件的方法是在工作区内创建一个名为“.tfignore”的文件,以便再次启用全局过滤的文件。
# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll
More details can be found here
更多详情可在这找到
MSDN: Add files to the server - Customize which files are ignored by version control
MSDN:将文件添加到服务器 - 自定义版本控制忽略哪些文件
#1
1
I found an answer but I think it's a kludge. You can edit the LocalItemExclusions.config file found here: C:\Users\%username%\appdata\local\microsoft\team foundation\4.0\configuration\versioncontrol.
我找到了答案,但我认为这是一个问题。您可以编辑此处找到的LocalItemExclusions.config文件:C:\ Users \%username%\ appdata \ local \ microsoft \ team foundation \ 4.0 \ configuration \ versioncontrol。
Ultimately, I think the ignored files should be overridden from the API, but I can't find such an option.
最终,我认为应该从API中覆盖被忽略的文件,但我找不到这样的选项。
#2
0
It is an older question, but this may help others: Another way to get files recognized as candidates is to create a file called ".tfignore" within the workspace that enables globally filtered files again.
这是一个较老的问题,但这可能有助于其他人:另一种将文件识别为候选文件的方法是在工作区内创建一个名为“.tfignore”的文件,以便再次启用全局过滤的文件。
# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll
More details can be found here
更多详情可在这找到
MSDN: Add files to the server - Customize which files are ignored by version control
MSDN:将文件添加到服务器 - 自定义版本控制忽略哪些文件