LaunchWizard with new Zip Templates?

From a Tool WIndow I have added, I need to launch an existing Wizard. Previously I have used DTE.LaunchWizard('foo'.vsz, params) but how is this done with the new Templates.zip model

Is there a managed way to launch the new wizards


Answer this question

LaunchWizard with new Zip Templates?

  • Phil333

    btw, I can easily access DTE from the code and create a new solution but none of my previous templates seem to work that did in VS 2003.
  • Duppi

    Oops - sorry about the extra smileys in there - please ignore those. I do not know how they got in....
  • Paulo Sebastiao

    The way in which projects are created from templates has changed. To use the Zip templates, use GetProjectTemplate, as shown below:

    Sub SolutionExample()

        ' Macro example.

        ' This function creates a solution and adds a Visual C# Console

        ' project to it.

        Dim soln As Solution2 = CType(DTE.Solution, Solution2)

        Dim csTemplatePath As String

        Dim csPrjPath As String = "C:\UserFiles\someFolder\MyCSProject"

    < xml:namespace prefix = o ns = "urnTongue Tiedchemas-microsoft-comSurprisefficeSurpriseffice" />> >

        MsgBox("starting")

        ' Get the project template path for a C# console project.

        csTemplatePath = soln.GetProjectTemplate _

        ("Console Application", "CSharp")

    > >

        ' Create a new C# Console project using the template obtained

        ' above.

        soln.AddFromTemplate(csTemplatePath, csPrjPath, _

        "New CSharp Console Project", False)

        MsgBox("done")

    End Sub


    HTH - Sirkku


  • LaunchWizard with new Zip Templates?