编程生成Visual Studio解决方案 [英] Programmatically generate Visual Studio Solution

查看:212
本文介绍了编程生成Visual Studio解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写在.NET中的向导,编程产生了一些项目的Visual Studio解决方案。我将有一个XML文件与文件的详细信息需要被包括在其各自的路径的项目,以获取它们与项目名称的列表。有没有什么办法可以做到这一点。

I want to write a wizard in .net which programmatically generates Visual Studio Solution with some projects. I will have a XML file with details of files need to be included in the project with their respective paths to fetch them and a list of project names. Is there any way I can achieve this

推荐答案

好了V​​isual Studio的SDK将是您的路径去。有方法,你可以创建文件,我想也是基于项目模板的项目。因此,举例来说,你可以创建一个新的asp.net mvc的项目或一个类库。你甚至可以创建自己的模板。

Well the Visual Studio SDK would be your path to go. There are methods where you can create files and I think also projects based on project templates. So for instance you can create a new "asp.net mvc" project or a class library. You could even create your own template.

我敢肯定,你可以只在VS做到这一点。

I am quite sure that you can do this only inside VS.

否则,没有什么错误生成项目和SLN文件是生成的XML文件,这就是好的东西,他们到底纯XML之一。你只需要生成一些Projectd的GUID,但我认为这将是相当简单的,完全合法。

Otherwise, there is nothing wrong to generate the project and sln files be generating the xml files, thats one of the good things that they are plain xml in the end. You just need to generate some Projectd Guids, but I think this would be fairly simple and totally "legal".

不错的进步!

这篇关于编程生成Visual Studio解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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