Visual Studio-以编程方式配置源代码控制解决方案 [英] Visual Studio - Programmatically configure solution for source control

查看:118
本文介绍了Visual Studio-以编程方式配置源代码控制解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建向导,以帮助我的组织自动为所有应用程序创建基础项目.这个想法是程序员可以输入项目名称,其他一些基本知识,并且该过程将创建一些项目,从源代码控制中添加其他项目,配置IIS等.

I am in the process of creating a Wizard to help my organization auto create a base project for all applications. The idea is that a programmer can enter a project name, a few other basics and the process will create some projects, add other project from source control, configure IIS, etc...

许多工作仅通过使用项目模板和IWizard界面来完成一些更复杂的操作即可完成.我要这样做的是,一旦自动创建了所有项目,就创建了一个工作区,并在源代码控制下自动移动了所有文件.我也在做诸如添加通用项目,在IIS中设置一些特殊设置之类的事情,等等.问题是,解决方案文件虽然处于源代码控制之下,但实际上并未配置为使用源代码控制.

A lot of the work is done by simply using project templates and the IWizard interface for some of the more complicated operations. What I am trying to do is this, once all of the projects are auto created, I am creating a workspace and automatically moving all of the files under source control. I am also doing things like adding common projects, setting up some special settings in IIS, etc... The problem is that the solution file, although it is under source control, is not actually configured to use source control.

任何人都有关于如何以编程方式配置解决方案的想法,以便使该解决方案成为源代码管理的一部分并可以使用吗?我碰到一堵墙,似乎无法再进一步了.顺便说一句:如果a不清楚,我实质上是在尝试执行与右键单击项目并选择向源代码管理中添加解决方案"相同的代码.

Anyone have an idea on how to programmatically configure a solution so that it is part of source control and ready to use? I've run into a brick wall and can't seem to get any further. BTW: In case a didn't make it clear, I'm essentially trying to do the same in code as right clicking on a project and selecting "Add Solution to Source Control."

就像我说过的,我已经解决了大多数问题.只是这最后一个给了我合适的身材...

Like I've said, I've got most of the issues solved. Just this last one is giving me fits...

重要事实: Windows XP VS 2008 TFS 使用Microsoft.TeamFoundation对象....

The important facts: Windows XP VS 2008 TFS Using Microsoft.TeamFoundation objects....

推荐答案

您可以通过Visual Studio扩展性框架来解决此问题吗? EnvDTE基本上提供了对您可以交互进行的所有操作的访问权限...

Can you handle this through the Visual Studio extensibility framework? EnvDTE basically provides access to anything you can do interactively...

这篇关于Visual Studio-以编程方式配置源代码控制解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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