TFS 2010 Beta 1 以编程方式创建团队项目 [英] TFS 2010 Beta 1 Creating Team Projects programmatically

查看:30
本文介绍了TFS 2010 Beta 1 以编程方式创建团队项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用一些 API 调用来创建新的团队项目(即将新团队项目添加到 TFS 2010 上的项目集合)?如果是,那是什么?我一直在为此寻找高低……

is it possible to use some API call to create a new team project (i.e. add a new team project to the Project Collection on TFS 2010)? If yes, what is it? I was searching high and low for this...

到目前为止,我找到了如何编写脚本,然后从命令行调用可执行文件:http://blogs.msdn.com/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx

So far I found how to script it and then call an executable from the command line: http://blogs.msdn.com/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx

推荐答案

我不确定这是否适用于 Beta 1,但适用于 Beta 2 - 很快就会推出.您需要参考 Microsoft.VisualStudio.TeamFoundation.TeamExplorer.dll(在 \Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies 下).然后,您可以新建一个 BatchTeamProjectCreator 对象并调用其 BatchCreateTeamProject 方法.您需要以 Grant 在他的博文中描述的相同格式传入一个设置文件.

I'm not sure if this will work with Beta 1, but it will work with Beta 2 - which will be out very soon. You'll want to take a reference on Microsoft.VisualStudio.TeamFoundation.TeamExplorer.dll (under \Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies). Then you can new up a BatchTeamProjectCreator object and call its BatchCreateTeamProject method. You'll need to pass in a settings file in the same format Grant described in his blog post.

这篇关于TFS 2010 Beta 1 以编程方式创建团队项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆