I need to read files from TFS Documents. Someone know about api for this?
I tried this code, but I don't know what is the service interface for documents
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);
Thanks
The documents you are referring to:
Are actually on a SharePoint portal linked to your team project not in source control:
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 document libraries can be accessed through the SharePoint API. See this question.
There is no way to directly access the documents in the SharePoint document library using the TFS API. The only way around is not storing the documents you mention on in the SharePoint document library.
For documents in TFS you have 3 options:
This blog post compares these 3 options.