locked
How to specify two wizard assemblies under <WizardExtension> tag in project template to create mvc4 application (vs2010) RRS feed

  • General discussion

  • I have posted some query in below link and got solution

    http://social.msdn.microsoft.com/Forums/en-HK/vsx/thread/a271e786-4ac1-4492-9ab7-5e866e1e5155

    i am using multi-project  template concept. That means , one root template is there. In root template will load 3 different templates with wizard concept.  

    based on the wizard option chosen i will load only single template from 3 templates.

    i want to create mvc4 project using project template with wizard concept. In mvc4 packages concept is there. so need to specify the Nuget packages in wizard extension .   Please refer below project template code snippet.

    --------------------------------------------------------------------------------------

    <WizardExtension>
    <Assembly>
    MVC.Extensions.WizardFramework, Version=10.304.0.43, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89
    </Assembly>
    <FullClassName>
    MVCProjectTemplate.IWizardImplementationChild
    </FullClassName>
    <Assembly>
    NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    </Assembly>
    <FullClassName>
    NuGet.VisualStudio.TemplateWizard
    </FullClassName>
    </WizardExtension>
    <WizardData>
    <packages repository="extension" repositoryId="Microsoft.VisualStudio.10.MVC4.TemplatePackages-ENU">
    <package id="AspNetMvc" version="4.0.20126.16343" />
      <package id="AspNetRazor.Core" version="2.0.20126.16343" />
      <package id="AspNetWebApi" version="4.0.20126.16343" />
      <package id="AspNetWebApi.Core" version="4.0.20126.16343" />
      <package id="AspNetWebPages.Core" version="2.0.20126.16343" />
      <package id="EntityFramework" version="4.1.10331.0" />
      <package id="jQuery" version="1.6.2" />
      <package id="jQuery.Ajax.Unobtrusive" version="2.0.20126.16343" />
      <package id="jQuery.UI.Combined" version="1.8.11" />
      <package id="jQuery.Validation" version="1.8.1" />
      <package id="jQuery.Validation.Unobtrusive" version="2.0.20126.16343" />
      <package id="knockoutjs" version="2.0.0.0" />
      <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
      <package id="Microsoft.Web.Optimization" version="1.0.0-beta" />
      <package id="Modernizr" version="2.0.6" />
      <package id="System.Json" version="4.0.20126.16343" />
      <package id="System.Net.Http" version="2.0.20126.16343" />
      <package id="System.Net.Http.Formatting" version="4.0.20126.16343" />
      <package id="System.Web.Http.Common" version="4.0.20126.16343" />
      <package id="System.Web.Providers" version="1.1" />
      <package id="System.Web.Providers.Core" version="1.0" />
    </packages>
    </WizardData>

    --------------------------------------------------------------------------------------------------

    but the above code is not working (i.e. packages folder not installed in root node). when am specifying only nuget wizard extension , it will install packages folder . 

    my requirement is need to specify the two wizard assemblies in wizard extension to create mvc4 project.  

    how can i do this ?

    please download the project template from below link.

    Mvc3Razor.zip

    Need response ASAP. waiting for your reply.

    Thanks,


    siva

    Wednesday, September 12, 2012 9:21 AM

All replies

  • Hi Anyone,

    Please reply to the above question. urgent requirement . waiting for the solution.

    Thanks,


    siva

    Wednesday, September 12, 2012 10:58 AM
  • Hi Siva,

    I have involved some experts into this issue to see. There might be some time delay,

    appreciate for your patience.
     
    Thank you for your understanding and support.
     
    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Friday, September 14, 2012 7:36 AM
  • Hi Ego,

    No response in all the forums which i have posted.

    I am very much disappointed for your support.

    i have found the solution for the query myself. no response from your team.  i have posted so many queries regarding project template in msdn forum. never i got the correct solution.

    our requirement is not possible to complete means , please update your response in the respective forum.

    Thanks,


    siva


    • Edited by Siva Rajini Thursday, September 20, 2012 9:07 AM
    Thursday, September 20, 2012 9:07 AM
  • Hi Siva,

    how have you solved this issue? I have the same problem.

    Thank you in advance.

    Mauro

    Monday, October 28, 2013 9:29 AM
  • I found out that adding two <WizardExtension> works in templates added manually in \Documents\Visual Studio 2012\Templates\ProjectTemplates but not using vsix:

    <WizardExtension>
        <Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
        <FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
      </WizardExtension>
      <WizardData>
        <packages repository="template" >
          <package id="Castle.Core" version="3.2.0"  />

          ...

        </packages>
      </WizardData> 
      <WizardExtension>
        <Assembly>MyWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=28524baeb4771010</Assembly>
        <FullClassName>MyWizard.Wizard</FullClassName>
      </WizardExtension>

    Monday, October 28, 2013 3:09 PM
  • That doesn't work in the context of a GAT/GAX solution, because both, the NuGet wizard and the GAT build task, insist on using the first WizardData element in the document. (Worse: GAT in my particular case doesn't need a WizardData, but instead of ignoring the other one, it throws an exception).

    If anyone has solved that issue, please let me know!

    Thx.


    Alexander


    • Edited by AlexanderJ Wednesday, November 27, 2013 9:38 AM
    Wednesday, November 27, 2013 9:37 AM
  • Just when I was about to give up, I found the solution:

    ONE WizardData element containing information for both WizardExtensions. Additionally an empty element to satisfy GAT:

        <WizardExtension>
            <Assembly>Microsoft.Practices.RecipeFramework.VisualStudio, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</Assembly>
            <FullClassName>Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate</FullClassName>
        </WizardExtension>
        <WizardExtension>
            <Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
            <FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
        </WizardExtension>
        <WizardData>
            <Template xmlns="http://schemas.microsoft.com/pag/gax-template" SchemaVersion="1.0">
            </Template>
            <packages repository="registry" keyName="AspNetMvc4VS2010" isPreunzipped="true">
                <package id="EntityFramework" version="5.0.0" skipAssemblyReferences="true" />
                <package id="jQuery" version="1.7.1.1" />
                <package id="jQuery.Validation" version="1.9.0.1" />
                <package id="jQuery.UI.Combined" version="1.8.20.1" />
    [...]
            </packages>
        </WizardData>
    

    And now it works.


    Alexander

    Wednesday, November 27, 2013 9:58 AM