从 TFS 文档中读取文件
Read files from TFS Documents
我需要从 TFS 文档中读取文件。
有人知道 api 吗?
我试过这段代码,但不知道文档的服务接口是什么
TfsTeamProjectCollection server = new TfsTeamProjectCollection(new Uri("http://xxx:8080/tfs"));
VersionControlServer version = server.GetService(typeof(Docu)) as VersionControlServer;
var items = version.GetItems(@"$\Development\Documents\Scenarios", RecursionType.None);
tfs documents
谢谢
您所指的文档:
实际上在链接到您的团队项目的 SharePoint 门户上,不在源代码管理中:
You can share documents and files that you want to make available to all team members by uploading them to the project portal for your team project. You can create document libraries and organize the files that you upload to your project portal within those libraries, in addition to folders and subfolders. The folders and subfolders always appear in alphabetical order. (source)
可以通过 SharePoint API 访问 SharePoint 文档库。参见 this question。
无法使用 TFS API 直接访问 SharePoint 文档库中的文档。唯一的解决方法是不将您提到的文档存储在 SharePoint 文档库中。
对于 TFS 中的文档,您有 3 个选项:
- 将它们存储为工作项的附件(通过 TFS WorkItemTracking API 检索)
- 将它们作为版本化项目存储在源代码管理中(通过 TFS VersionControl API 检索)
- 将它们存储在链接到您的团队项目的文档库中(通过 SharePoint 检索 API)
This blog post 比较这 3 个选项。
我需要从 TFS 文档中读取文件。 有人知道 api 吗?
我试过这段代码,但不知道文档的服务接口是什么
TfsTeamProjectCollection server = new TfsTeamProjectCollection(new Uri("http://xxx:8080/tfs"));
VersionControlServer version = server.GetService(typeof(Docu)) as VersionControlServer;
var items = version.GetItems(@"$\Development\Documents\Scenarios", RecursionType.None);
tfs documents
谢谢
您所指的文档:
实际上在链接到您的团队项目的 SharePoint 门户上,不在源代码管理中:
You can share documents and files that you want to make available to all team members by uploading them to the project portal for your team project. You can create document libraries and organize the files that you upload to your project portal within those libraries, in addition to folders and subfolders. The folders and subfolders always appear in alphabetical order. (source)
可以通过 SharePoint API 访问 SharePoint 文档库。参见 this question。
无法使用 TFS API 直接访问 SharePoint 文档库中的文档。唯一的解决方法是不将您提到的文档存储在 SharePoint 文档库中。
对于 TFS 中的文档,您有 3 个选项:
- 将它们存储为工作项的附件(通过 TFS WorkItemTracking API 检索)
- 将它们作为版本化项目存储在源代码管理中(通过 TFS VersionControl API 检索)
- 将它们存储在链接到您的团队项目的文档库中(通过 SharePoint 检索 API)
This blog post 比较这 3 个选项。