Is it possible to add a New Project Wizard with a VSPackage?
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 i开发者_如何转开发nformation and/or samples on how to accomplish this?
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.
精彩评论