Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Error using Project template - Package templates may not be properly registered.
 

Error using Project template - Package templates may not be properly registered.

Hi, I am using the Guidance package to createa new guidance package. The example stubs a console app and a website. When I add a project vstemplate for a class library I receive the error below. Am I supposed to registerthenew template?

System.InvalidOperationException: Cannot find registration information for template "C:\Documents and Settings\bbyrd\My Documents\Visual Studio 2005\Projects\FPPSGuidance\FPPSGuidance\bin\Debug\Templates\Solutions\Projects\BusinessEntities\BusinessEntities.vstemplate". Package templates may not be properly registered. Run package installation again and verify template name and location.
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.GetTemplateRegistryData(String templateFileName)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.Microsoft.Practices.RecipeFramework.VisualStudio.Common.IVsTemplatesService.GetTemplate(String templateFileName)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.GetTemplate(String templateFile, ArrayList templates, GuidancePackage guidancePackage)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.GetTemplates(String directory, ArrayList templates, GuidancePackage guidancePackage)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.PopulateTemplates(String basePath, ArrayList templates, GuidancePackage guidancePackage)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.Microsoft.Practices.RecipeFramework.VisualStudio.Common.IVsTemplatesService.GetHostAssets(String basePath)
at Microsoft.Practices.RecipeFramework.VisualStudio.VsGuidancePackage.InitializeTemplateCommands()
at Microsoft.Practices.RecipeFramework.VisualStudio.VsGuidancePackage.InitializeCommands()
at Microsoft.Practices.RecipeFramework.VisualStudio.VsGuidancePackage.OnSited()
at Microsoft.Practices.ComponentModel.ContainerComponent.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at Microsoft.Practices.RecipeFramework.VisualStudio.SolutionPackagesContainer.OnEnabledPackage(Object sender, PackageEventArgs e)

bbyrd  Thursday, January 18, 2007 9:32 PM

Did you make sure all the files under your "Templates" folder (your .xxproj, your .vstemplate, and related files) are marked as "Content" and "Copy if Newer" ?

Take a look at this folder: C:\Documents and Settings\bbyrd\My Documents\Visual Studio 2005\Projects\FPPSGuidance\FPPSGuidance\bin\Debug\Templates\Solutions\Projects\BusinessEntities\

and all required files should be there, if they're not, then most probably you're missing what I said above...

HTH,
-Victor.

vga  Friday, January 19, 2007 4:55 AM

Did you make sure all the files under your "Templates" folder (your .xxproj, your .vstemplate, and related files) are marked as "Content" and "Copy if Newer" ?

Take a look at this folder: C:\Documents and Settings\bbyrd\My Documents\Visual Studio 2005\Projects\FPPSGuidance\FPPSGuidance\bin\Debug\Templates\Solutions\Projects\BusinessEntities\

and all required files should be there, if they're not, then most probably you're missing what I said above...

HTH,
-Victor.

vga  Friday, January 19, 2007 4:55 AM

Hi Victor,

Yes, that did help.

Also, it helped to delete the already built folders using the path you provided.

VERY much appreciated...

bbyrd  Friday, January 19, 2007 5:12 PM
No problem, glad I could help. Keep us posted on your guidance development experiences!
vga  Friday, January 19, 2007 5:52 PM
I am getting the same error, but with no luck. The sameple recipe and solution which comes w. the GAT works, but when I apply the same thing to my own, the solution works but I cannot apply the wizard extension to the sub-projects vstemplate files. If I do then I get the following error. They are all marked as content, copy if newer and I have registered my packaged numerous times.

"System.InvalidOperationException: Cannot find registration information for template "C:\projects\Pgn.VisualStudio.Guidance\Pgn.VisualStudio.Guidance\bin\Debug\Templates\Solutions\WCF\Projects\ConsoleApplication\ConsoleApplication.vstemplate". Package templates may not be properly registered. Run package installation again and verify template name and location.
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.GetTemplateRegistryData(String templateFileName)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.VSTemplatesService.Microsoft.Practices.RecipeFramework.VisualStudio.Common.IVsTemplatesService.GetTemplate(String templateFileName)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.LoadTemplateData(Dictionary`2 replacementsDictionary, String templateFileName)"
SOULCRSHR  Monday, August 18, 2008 3:44 PM

You can use google to search for other answers

Custom Search

More Threads

• $ProjectName$ passed into a template creator is not expanded
• Is there any way to automate the data repository mappings?
• GAX installed but not showing in VS 2008
• Recipe spawning on pretty much anything using custom GUID/IDs
• Installation issue with web service software factory
• Parameters not getting updated on unfolding projects programatically in a GP
• Beta 2 Class Wizard does not work
• Package version
• GAX/GAT breaking DSL
• Can't download GAT, GAX?