index > Visual Studio Guidance Automation Toolkit > Custom UnfoldTemplate

Custom UnfoldTemplate

I have a class derived from UnfoldTemplate that I am attempting to utilize in a '.vstemplate' file. The class resides in a seperate assembly from the GAT, the assembly is strong named and references no assemblies other than what is required for type resolution of UnfoldTemplate. All attempts to register the GAT report the following exception:

An exception occurred during the Install phase.
Microsoft.Practices.RecipeFramework.RecipeFrameworkException: Unexpected error loading template file name MySolution.vstemplate. Make sure that the template is well formed and try again.
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.TemplateMetaData.ReadTemplate()

// Exception stack trace omitted for brevity

The inner exception System.ArgumentException was thrown with the following error message: The template does not have the correct WizardExtension data..
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.TemplateMetaData.ReadTemplate()

I've used the ReflectionHelper class located in the Microsoft.Practices.Common assembly to verify that the Type can be loaded based on the following XML fragment:

<Assembly>MyRecipeFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9fab3f7fbe0827fd</Assembly>
<FullClassName>MyRecipeFramework.Templates.UnfoldTemplate</FullClassName>

I am at a loss as to what could preventing the GAT from successfully registering. Any help would be greatly appreciated.
farproc2000
If you reflector the Microsoft.Practices.RecipeFramework.VisualStudio.Templates.TemplateMetaData.ReadTemplate() method, you will find near the bottom that all we're doing is verifying that we can load the type, and that the type can be assigned to UnfoldTemplate.

Verify that that is the case with your assembly (i.e. it's deployed to IDE\PublicAssemblies folder) and it should work.
kzu
Daniel,
Using Reflector, I examined the code in the ReadTemplate method and verified the issue with the following trimmed down code:

string assemblyName = "MyRecipeFramework.Templates.UnfoldTemplate
farproc2000
reply 3

You can use google to search for other answers

 

More Articles

• GAT fails to install, claims GAX is missing
• How do I add an empty project folder?
• T4 in a custom tool
• how begin?.. please help, I'm lost
• Package version
• GAT Problem
• Reality Check?
• Set version for Guidance Package
• How should I deploy additional binaries?
• Solution Folder Name
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Registering guidance with the experiment
• Create New Project Hangs
• How to use Generic List in T3
• Extending Designer Toolbox
• Alter Name of Solution
• How to Create Web Service Agent ?
• How do you add a using/reference to a t4
• Register Guidance Package fails
• Loosing Item Template Information
• Simulate DependentUpon with DTE class
• When is the next release for GAT???
• Error while unfolding template with empt
• web project template, to fire code in ga
• Creating projects in a subdirectory
• GAT Wrapper

Hot Articles

• Error 1001: Item has already been added.
• Project templates do not appear in VS 20
• Upgrading Headaches
• Is GAT dead?
• GAT not compatible with W2K?
• Package works when manually registered b
• Can't download GAT, GAX?
• Build path
• Newbie question: <AssemblyName>me.
• Beta 2 Class Wizard does not work
• Code Snippets not uninstalling
• Can you detect all installed packages?
• Support for Web Application Project
• Unable to install GAX June CTP - States
• Installation error

Recommend Articles

• Argument Expansion - Unfold Template
• Is there any way to run an action when a
• How should I deploy additional binaries?
• Error install GAX
• Is GAT/GAX compatible with non-English v
• Guidance actions are gone
• Extend the Meta-Guidance Package
• How can you skip the UI when you run a r
• Error Installing to RTM Version of VS2005
• Nested Project Templates
• Wizard size and colors
• Problem with Specifying Command Bars
• Newbie Problem
• Get all classes from a Project?
• web project template, to fire code in ga