命令“File.BatchNewTeamProject”在 VSTS 2010 中不可用
我正在尝试使用 VS 2010 中内置的名为 File.BatchNewTeamProject 的命令(使用项目设置文件作为参数)自动创建团队项目,并从我的 c# win 应用程序在后台以静默方式执行此过程。我知道团队资源管理器必须打开并连接到 TFS 才能运行此命令,但是,当我使用 devenv.exe 启动进程时,会弹出一个新的 Visual Studio 实例,但默认情况下团队资源管理器未连接。我该如何解决这个问题?
I am trying to automate the creation of team projects using a command built into VS 2010 called File.BatchNewTeamProject using a project settings file as an argument, and executing this as a process silently in the background from my c# win app. I am aware of a requirement that Team Explorer has to be open and connected to TFS before this command can run, however, when I start a process with devenv.exe, a fresh instance of visual studio pops up with Team Explorer not connected by default. How can I solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我添加了一个额外的命令语句,整个事情开始工作。
devenv /命令 view.TeamExplorer /命令“File.BatchNewTeamProject”C:\vss2TeamFoundation\ProjectCreation\Ajax.xml
I added an extra command statement and the whole thing started working.
devenv /command view.TeamExplorer /command "File.BatchNewTeamProject "C:\vss2TeamFoundation\ProjectCreation\Ajax.xml
刚刚在 Codeplex 上发布了这个项目: http://tfsprojprovisioner.codeplex.com/
包含一个隐藏 BatchNewTeamProject 的程序集一个简单的编程界面,以及一个可用于创建和配置新团队项目的示例桌面应用程序。必须在安装了 VS 2010 的计算机上运行,并且由有权创建新项目的用户运行。但它根本不需要您直接与 VS 交互。
Just posted this project on Codeplex: http://tfsprojprovisioner.codeplex.com/
Includes an assembly that hides BatchNewTeamProject behind a simple programmatic interface, and a sample desktop app that you can use to create and provision new Team Projects. Must be run on a computer that has VS 2010 installed, and by a user that has permissions to create new projects. But it doesn't require you to interact with VS directly, at all.