如何创建一个TFS 2010团队项目使用SDK? [英] How can I create a TFS 2010 Team Project using the SDK?
问题描述
我听说这是不可能的,但我想我会问这里得到一个明确的答案。有没有一种方法使用的Team Foundation Server 2010 SDK中的集合以编程方式创建一个新的项目?
I've heard that it's not possible, but I figured I'd ask here and get a definitive answer. Is there a way to use the Team Foundation Server 2010 SDK to programatically create a new project in a collection?
到目前为止,我所看到的是使用脚本在VS 2010的IDE这个方法:<一href="http://blogs.msdn.com/b/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx" rel="nofollow">http://blogs.msdn.com/b/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx.丑。
So far, all I've seen is to use this method of scripting the VS 2010 IDE: http://blogs.msdn.com/b/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx. Ugly.
我让我的手指穿过,有一个更好的办法。想法?
I'm keeping my fingers crossed that there's a better way. Ideas?
推荐答案
您可以用这个来代替命令行:
You can use this instead of the command line:
string log = @"C:\Builds\tfsLog.txt";
string settingsFilePath = @"C:\TeamProjects\TeamProjectSettings.xml";
var batchTeamProjectCreator = new BatchTeamProjectCreator();
var succes = batchTeamProjectCreator.BatchCreateTeamProject(settingsFilePath, out log);
您将需要添加一个引用到这个dll:
you'll need to add a reference to this dll:
C:\ Program Files文件(x86)的\微软的Visual Studio 10.0 \ Common7 \ IDE \ PrivateAssemblies \ Microsoft.VisualStudio.TeamFoundation.TeamExplorer.dll
您仍需要使用XML,但其多一点优雅。
希望这是你要寻找的。 :)
Hope this is what you where looking for. :)
祝你好运, Oshry
Good luck, Oshry
这篇关于如何创建一个TFS 2010团队项目使用SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!