views:

204

answers:

1

I have a VSPackage for Visual Studio 2008 that I created for adding some editor and custom language functionality. I also have a need to add a new project/solution wizard to create a new Solution and a complex series of C++ projects to the solution. I know I can do this using a "Custom Wizard", but I would be much happier if I can implement this within my VSPackage using C# instead.

So I guess the main question is, is it possible to add an entry to the Project Types dialogs in Visual Studio from a VSPackage? Or is the "Custom Wizard" and JScript my only option here?

And if it's possible, where can I find information and/or samples on how to accomplish this?

+1  A: 

To add an entry to the Project Types dialog, you need to install a project template (a zip file containing a .vstemplate file) as part of your installation. You will want to do this from your setup routine rather than from the VSPackage itself.

However, your .vstemplate can invoke a wizard written in C#. Although this is indeed a "custom wizard," you can provide a reference to a .NET assembly. There is no need to use a scripting language.

For an example, see IronPython > C# Example.IronPythonProject in the VS2008 SDK browser. Unfortunately this demonstrates only limited wizard functionality and only for project items rather than projects, but I hope it will be useful all the same.

itowlson
Thanks for the info. I looked into this but I couldn't figure out how to do this with a VSTemplate for projects that I could put under Visual C++. However, this did steer me down a path to where I figured out how to implement IDTWizard in C# and create a .vsdir/.vsz to invoke it, so I'm able to do everything I need that way. Thanks.
Gerald