1

I'm trying to create a Visual Studio project Template that includes 3 types of projects.

Thus when the user want to create a new project using the template, he should be able to choose first the type of Project.

Is there any method to do this? Or do I have to create a template for each project?

1 Answers1

0

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.

But this is sure a bit troublesome. It's much easier to just create a template per project.

Community
  • 1
  • 1
Nikolay
  • 10,752
  • 2
  • 23
  • 51
  • thx for your help :) ! I did exactly what you proposed, but the template is always generating the 3 projects. – Zeineb Snoussi Jul 29 '15 at 07:27
  • Hmm. That's odd. It worked for me. Try "always throwing" the exception to check conditions. Means, this exactly procedure worked for me. Check out this project for example: https://github.com/nbelyh/VisioPanelAddinVSTO/blob/master/Wizard/ChildWizard.cs – Nikolay Jul 29 '15 at 07:45
  • thx Nikolay ! it works now. Thank you so much for your help :) – Zeineb Snoussi Jul 29 '15 at 08:06
  • No problem. If it works you can mark it as an answer. – Nikolay Jul 29 '15 at 13:55