I am trying to create a VISX extension for Visual Studio 2010 that contains several project templates. These templates are not very complex, but I want to provide them with additional configuration during creation using the wizard. I have successfully configured my VISX package to deploy the templates in the directory structure that I want in VS2010, but as soon as I try to configure and run the wizard, I get an error when I create the template line by line:
Error: this template tried to load the component assembly 'My.Assembly, Version 1.0.0.0, Culture = neutral, PublicKeyToken = ...
My current configuration is as follows:
- All projects live in the same solution.
- A VISX project includes project links to a project containing wizards and each template.
- Each template is built from a project template template (... confusing terminology).
- They are added through the .vsixmanifest constructor as content, referencing projects.
- Each .vstemplate file has a WizardExtension element that points to an IWizard implementation and contains an assembly.
- The wizard assembly is signed.
The .vstemplate files point to their wizard like this:
<WizardExtension>
<Assembly> My.Assembly, Version = 1.0.0.1, Culture = neutral, PublicKeyToken = a494da9e6e53f845, Custom = null </ Assembly>
<FullClassName> My.Assembly.Wizard </FullClassName>
</WizardExtension>
This, as far as I can tell, is how I should do it. What exactly is going wrong? Looks like he can't find the assembly. Are there any other steps I need to take to get the assembly visible to the templates? The assembly is deployed to the extension folder when it is installed (I checked it), so it at least does it. Is there anything special I need to do with .vstemplate files in order to get them to look into the extensions folder against the GAC? Did I miss something?
Please note that I found several pages on the Internet that indicate that I should build the GAC manually or using a script. However, few had my exact scenario (project template templates referenced by a VISX project, most examples use a regular project exported using the project template wizard, and their packages are dumped into the VISX folder structure). The only one I found that matched my scenario was an example from Microsoft. I tried to match this, but alas, it still doesn't work. I tried to move the project that I downloaded to refer to this question, but I can not find it again.
Using scripts is the way we did it before, but I want to try and make it a little cleaner using VISX packages. I would like to avoid this, but if it is mandatory for the VISX script to install the template in the GAC, I can do it.