问题描述
我是新手,正在编写VB.NET程序,但我不知道该怎么做:
a)将文件从TFS复制到硬盘驱动器
b)读取TFS中文件的内容
我尝试过的google搜索被证明不成功.
到目前为止,我正在使用VS2008 SDK中的以下.dll:
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
I''m new to development and am coding a VB.NET program and I cannot figure out how to either:
a) Copy file(s) from TFS to the hard drive
b) Read the contents of file(s) in TFS
The google searches I''ve attempted have proven unsuccessful.
Thus far I''m using the following .dll''s from the VS2008 SDK:
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
推荐答案
TeamFoundationServer tfsServer = new TeamFoundationServer(tfsUri, credentials);
VersionControlServer vcServer = (VersionControlServer)tfsServer.GetService(typeof(VersionControlServer));
if (vcServer == null)
throw new ApplicationException("Invalid vcServer");
Item i = vcServer.GetItem(@"
我只是注意到您正在VB.Net中进行此操作,应该很容易从C#进行转换.
I just noticed you''re doing this in VB.Net, should be easy to convert from C#.
这篇关于从Team Foundation Server检索文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!