locked
Custom project templates without assembly Gacing RRS feed

  • Question

  • Hi Folks.

    I am working on VS 2012 Multi project solution template with Custom wizard(WPF Form) which takes input from user and creates the solution structure.

    As per the below link :

     http://msdn.microsoft.com/en-IN/library/ms185301(v=vs.80).aspx, I have implemented the same,having class library implementing from IWizard,gacing assembly and packing it in a VSIX.

    Question I have is : Can we avoid assembly Gacing without effecting the functionality.

    If not Can I have dll that needs to Gac'ed delivered as a part of VSIX packages and automatically install inot GAc thorugh VSIX.

    Problem is How to share the project templates to other team members?



    Regards,

    SOni
    Wednesday, April 24, 2013 6:36 PM

Answers

  • Does your wizard assembly have dependencies on other assemblies that aren't deployed via the VSIX?

    I have a VSIX project that doubles as my IWizard assembly, and a couple of project template projects in the solution, so my manifest looks something like:

    <?xml version="1.0" encoding="utf-8"?>
    <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
      <Metadata>
        <Identity Id="Microsoft.CTS.VSXWizards" Version="1.0" Language="en-US" Publisher="Microsoft.CTS" />
        <DisplayName>VSXWizards</DisplayName>
        <Description>VSX Project Wizards</Description>
      </Metadata>
      <Installation>
        <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="11.0" />
      </Installation>
      <Dependencies>
        <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />
      </Dependencies>
      <Assets>
        <Asset Type="Microsoft.VisualStudio.Assembly" Path="|%CurrentProject%|" d:Source="Project" d:ProjectName="%CurrentProject%" AssemblyName="|%CurrentProject%;AssemblyName|" />
        <Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="VSXAddin" d:TargetPath="|VSXAddin;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
        <Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="VSXPackage" d:TargetPath="|VSXPackage;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
      </Assets>
    </PackageManifest>

    And the WizardExtension section of my .vstemplate files look something like:

      <WizardExtension>
        <Assembly>VSXWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9e6108b4a8630481</Assembly>
        <FullClassName>Microsoft.CTS.VSXWizards.VSXAddinWizard</FullClassName>
      </WizardExtension>

    Sincerely,


    Ed Dore

    Monday, April 29, 2013 10:23 PM

All replies

  • Hi,
    Welcome back.
    I will involve more experts to investigate it. It may be some times delayed.
    If you are urgent about this issue, please call the paid Microsoft Support.
    Have a nice day.
    Regards,


    Elegentin Xie
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, April 26, 2013 8:38 AM
  • Components deployed via .VSIX cannot be GAC'd. And there is no reason why your assembly implementing IWizard would "need" to be placed in the GAC. You can deploy it via your .VSIX file.

    Ideally, your .VSIX would deploy both the template(s) and your wizard assembly.

    Sincerely,


    Ed Dore

    Saturday, April 27, 2013 12:56 AM
  • Hi Dore,

    I will try without gacing and will let you the results.

    Thanks,

    Soni

    Saturday, April 27, 2013 6:38 PM
  • Hi Dore,

    I tried the approach you mentioned,I got the following error:

    I shipped the dll with VSIX package

    Monday, April 29, 2013 2:42 PM
  • Does your wizard assembly have dependencies on other assemblies that aren't deployed via the VSIX?

    I have a VSIX project that doubles as my IWizard assembly, and a couple of project template projects in the solution, so my manifest looks something like:

    <?xml version="1.0" encoding="utf-8"?>
    <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
      <Metadata>
        <Identity Id="Microsoft.CTS.VSXWizards" Version="1.0" Language="en-US" Publisher="Microsoft.CTS" />
        <DisplayName>VSXWizards</DisplayName>
        <Description>VSX Project Wizards</Description>
      </Metadata>
      <Installation>
        <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="11.0" />
      </Installation>
      <Dependencies>
        <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />
      </Dependencies>
      <Assets>
        <Asset Type="Microsoft.VisualStudio.Assembly" Path="|%CurrentProject%|" d:Source="Project" d:ProjectName="%CurrentProject%" AssemblyName="|%CurrentProject%;AssemblyName|" />
        <Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="VSXAddin" d:TargetPath="|VSXAddin;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
        <Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="VSXPackage" d:TargetPath="|VSXPackage;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
      </Assets>
    </PackageManifest>

    And the WizardExtension section of my .vstemplate files look something like:

      <WizardExtension>
        <Assembly>VSXWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9e6108b4a8630481</Assembly>
        <FullClassName>Microsoft.CTS.VSXWizards.VSXAddinWizard</FullClassName>
      </WizardExtension>

    Sincerely,


    Ed Dore

    Monday, April 29, 2013 10:23 PM
  • Hi Dore,

    Thanks for your time and valuable inputs.

    Yes My wizard assembly is referring some other assembly.I will try again by examining your vstemplate and vsixmanifest, and will let you know

    Regards

    Soni

    Tuesday, April 30, 2013 4:05 PM