I have a very simple IWizard
implementation with sole the purpose of adding a parameter variable to the dictionary (no user interaction is required).
I don't want to have to add this to the GAC if possible.
I placed the dll
in the root of the template zip file with the vstemplate
file and have referenced the name in the WizardExtension
section:
<WizardExtension>
<Assembly>Wizard.dll</Assembly>
<FullClassName>Wizard.Wizard</FullClassName>
</WizardExtension>
I was hoping that this would find and use the local copy of the assembly, but it doesn't appear to work.
Is there any way of using an IWizard
implementation without installing to the GAC?
I have finally checked the solution described here.
The idea is that we must add the assembly which implements the IWizard to the GAC or to any other place which Visual Studio looks using the assembly probing mechanism. VS looks for our template assembly near itself (devenv.exe) at C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
. It also looks in two subdirectories: PrivateAssemblies
and PublicAssemblies
.
I'm not sure whether it is required to sign our assembly with a strong name key or not (I use the signed one in my case). You can check it easily.
So, if I am not mistaken, it isn't possible to force the assembly to be used directly from your template zip file. In order to make the usage and update of my template easier I'm going to create a small setup project.
Last note. As far as I know, you mustn't specify the .dll extension of your assembly in the Assembly tag. Here is how I write a vstemplate part for my wizard extension assembly:
<WizardExtension>
<Assembly>WpfTaskTemplateWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=22050f445905b871</Assembly>
<FullClassName>WpfTaskTemplateWizard.UIWizard</FullClassName>
</WizardExtension>