After going the http://docs.nuget.org/docs/reference/packages-in-visual-studio-templates I was able to configure nuGet package as a part of VSIX package for a single project template.As per the link we need to add Wizard Extension element to VSTEMPLATE of project template.
在访问http://docs.nuget.org/docs/reference/packages-in-visual-studio-templates后,我能够将nuGet包配置为单个项目模板的VSIX包的一部分。根据链接我们需要将Wizard Extension元素添加到项目模板的VSTEMPLATE中。
<WizardExtension>
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
</WizardExtension>
The problem begins when I want a custom Wizard implementing IWizard interface to be binded to the project template.To do this,I need to add a dll containing IWizard implementation to GAC and add the dll details the Wizard Extension element to VSTEMPLATE of project template again.
当我想要将实现IWizard接口的自定义向导绑定到项目模板时,问题就开始了。为此,我需要向GAC添加一个包含IWizard实现的DLL,并将向导扩展元素的dll详细信息再次添加到项目模板的VSTEMPLATE 。
So I want both then I will have something as below in VSTEMPLATE of project template
所以我想要两个,然后我将在项目模板的VSTEMPLATE中有如下内容
<WizardExtension>
<Assembly>NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>NuGet.VisualStudio.TemplateWizard</FullClassName>
<Assembly>XXXXXXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=96268505a6009a69</Assembly>
<FullClassName>XXXXXXX.ProjectTemplateWizard</FullClassName>
</WizardExtension>
In above scenario, the template will load only assembly,it does not recognize the second assembly.
在上面的场景中,模板将只加载程序集,它不识别第二个程序集。
Is there any way of doing it.
有没有办法做到这一点。
Regards, Qureshi
此致,库雷希
1 个解决方案
#1
0
Instead of having 2 assenblies in 1 extensionwizard element, try having 2 wizardextension elements and a seperate wizarddata element fornuget dll.
而不是在1个extensionwizard元素中有2个assenblies,尝试使用2个wizardextension元素和一个单独的wizarddata元素fornuget dll。
#1
0
Instead of having 2 assenblies in 1 extensionwizard element, try having 2 wizardextension elements and a seperate wizarddata element fornuget dll.
而不是在1个extensionwizard元素中有2个assenblies,尝试使用2个wizardextension元素和一个单独的wizarddata元素fornuget dll。