简体   繁体   English

创建Visual Studio(vs.net)2008解决方案模板?

[英]Create Visual Studio (vs.net) 2008 Solution Templates?

Is it possible to create vs.net 2008 solution templates. 是否可以创建vs.net 2008解决方案模板。 From my search results it is not possible to create a solution templates with all the respective project references. 从我的搜索结果中,无法创建包含所有相应项目引用的解决方案模板。

I have a vs.net solution with multiple projects and references in each. 我有一个vs.net解决方案,每个解决方案都包含多个项目和引用。 I would like to wrap all of them up into a template where I can use as standard base start for our web projects. 我想将它们全部包装到一个模板中,我可以将它作为我们Web项目的标准基础启动。

Has anyone come up with good solution for this? 有没有人为此提出好的解决方案?

I'm not certain exactly how it works to get this fully functional, but in the vs template xml, you can define a ProjectCollection with many ProjectTemplateLink entries, so I believe using this you should be able to create the setup you're looking for. 我不确定它是如何工作以使其完全正常运行,但在vs模板xml中,您可以定义一个带有许多ProjectTemplateLink条目的ProjectCollection ,所以我相信使用它你应该能够创建你正在寻找的设置。 However, I haven't worked with templates enough to be able to give a working example. 但是,我没有使用足够的模板来提供一个有效的例子。

What you want is to build a "Solution Template". 你想要的是建立一个“解决方案模板”。 The best way to do that is to use the Solution Factory add-in found in CodePlex. 最好的方法是使用CodePlex中的Solution Factory加载项。

http://solutionfactory.codeplex.com/ http://solutionfactory.codeplex.com/

Edit: An even easier way would be to create the solution with all the projects in the same file location, then zip up all the directories into one file. 编辑:更简单的方法是创建包含相同文件位置中所有项目的解决方案,然后将所有目录压缩到一个文件中。 Then just unzip and rename the solution directory as needed. 然后根据需要解压缩并重命名解决方案目录。

Edit2: Here is another way, Build an Add-in that will construct the solution for you. Edit2:这是另一种方法,构建一个将为您构建解决方案的加载项。 http://msdn.microsoft.com/en-us/vbasic/bb968855.aspx http://msdn.microsoft.com/en-us/vbasic/bb968855.aspx

There is something like a " Property Sheet " that you can inherit from in any new project. 有一些类似于“ 属性表 ”的东西,你可以在任何新项目中继承。 These sheets contain 'generic' settings that would apply to all your projects. 这些工作表包含适用于所有项目的“通用”设置。

Have you tried just setting your project the way you want it and then choose File -> Export Template? 您是否尝试过以您希望的方式设置项目,然后选择文件 - >导出模板? That would seem to be the simplest approach. 这似乎是最简单的方法。

我想说,此时您可能希望使用指导包来构建解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM