|
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 |
|