简体   繁体   English

创建一个包含3种项目类型的Visual Studio模板

[英]create a visual studio template that includes 3 types of project

I'm trying to create a Visual Studio project Template that includes 3 types of projects. 我正在尝试创建一个包含3种类型的项目的Visual Studio项目模板。

Thus when the user want to create a new project using the template, he should be able to choose first the type of Project. 因此,当用户想要使用模板创建新项目时,他应该能够首先选择Project的类型。

Is there any method to do this? 有什么方法可以做到这一点? Or do I have to create a template for each project? 还是我必须为每个项目创建一个模板?

You can create a multi-project template , then create "root wizard" which shows some UI to allow project selection, then "child wizard", for each project, which on creating a new project using your template when it's not needed, throw a WizardBackoutException in RunStarted method. 您可以创建多项目模板 ,然后创建“根目录向导”这显示了一些UI允许项目选择,然后“孩子向导”,对每一个项目,其使用是没有必要的,当你的模板创建新项目, RunStarted方法中的WizardBackoutException

But this is sure a bit troublesome. 但这肯定有点麻烦。 It's much easier to just create a template per project. 只为每个项目创建一个模板要容易得多。

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

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