index > Visual Studio Guidance Automation Toolkit > Error 1001: Item has already been added. Key in dictionary

Error 1001: Item has already been added. Key in dictionary

Playing around, (changing the generated package rebuilding ...) I have encountered the following:

Error 1001. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. --> Item has already been added. Key in dictionary: 'D:\alx\Projects\GuidancePackage1\GuidancePackage1\bin\Debug\Templates\Solutions\Projects\ConsoleApplication\ConsoleApplication.vstemplate' Key being added: 'D:\alx\Projects\GuidancePackage1\GuidancePackage1\bin\Debug\Templates\Solutions\Projects\ConsoleApplication\ConsoleApplication.vstemplate', (NULL), (NULL), (NULL).


Now I cannot repair the package or uninstall. The same error is reported.

What can be done ?

alx
alx
Hi alx,

Could you please describe "playing around"? -- some repro steps will surely help diagnosing the issue.

Thanks,

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Followers of the IHttpHandler
http://clariusconsulting.net/vga
vga

Hi alx,

Have you changed the name or guid of an already compiled (thus registered) package and tried to recompile it? I can repro the issue when doing the previous.

What is happening here is the templates will already be registered for another package, from the exact same location, and that won't work.

You could try the following workaround:
 
1 - Open regedit
2 - Open the HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{77d93a80-73fc-40f8-87db-acd3482964b2}\Templates
3 - Find the key that contains the guidance package you renamed (or the guid). There's an entry PackageName that will help you find out which one is the offending key. You will also see all the templates registered so you will be able to infer it by the templates location.
4 - Delete the key
5 - Restart VS

Hope this helps,

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Followers of the IHttpHandler
http://clariusconsulting.net/vga

vga

Worked like a charm. Thank You !

What I have done ? Hard to say.

I have generated a package, and I have started to modify the source files, trying to understand the structure. I have copied some source files, renamed them, modified them, compiled ...

After the error ocurred I was not able to open a Guidance package. I will try to reproduce-it now.

My goal was to understand how is supposed to be used.
I can see that this has a huge potential and I want to convert (and expand) my CodeSmith templates with this package.

What puzzles me right now is that I have searched the registry   ... with no result.

Yes: search whole string was checked !   Damn !

alx

alx
reply 4

You can use google to search for other answers

 

More Articles

• Newbie Problem
• Guidance Package Build
• Input arguments for wizards
• GAT on Visual Studio Release Candidate
• how to add website project
• Adding an Item to a solution (as opposed to a project)
• How should I deploy additional binaries?
• Bullet points for building a guidance automation package from scr...
• Problem Loading Package
• Custom Wizards and custom arguments
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Help with an error message
• Can't repair/uninstall GAT or GAX
• how begin?.. please help, I'm lost
• Trusted Assembly referenace Problem
• Is there a way to use the T3 engine as a
• How can you use T3 templates in VS templ
• T3 template engine
• How is GAT Package information persisted?
• Combining GAT and CAB
• How to Add Fixed Assets in GAT?
• GAT not compatible with W2K?
• Guidance Automation Extensions and Toolk
• Sharing gpState in TFS Source Control
• Extending Designer Toolbox
• Error install GAX

Hot Articles

• VSTS - Web Test - FIND TEXT command
• Guidance Automation Extensions and Toolk
• uninstall of HoLPackageSetup.msi failed
• Is GAT/GAX compatible with non-English v
• When is the next release for GAT???
• Input arguments for wizards
• Cannot download June CTP GAX or GAT - do
• How does one set a default value?
• Where can I get December 2005 version now?
• System.Collections.Generic.KeyNotFoundEx
• Microsoft.Jet.OLEDB.4.0
• GAT Custom Directive Processor
• Error installing GAX
• Solution Folder Name
• Problem Loading Package

Recommend Articles

• How to gather data without wizard
• How can you provide input to AddProjectD
• How to Create Web Service Agent ?
• Nested Project Templates
• GAT not compatible with W2K?
• VSTS - Web Test - FIND TEXT command
• Get Full Path for Project Item...
• warnings when I try to create guidance p
• Argument Expansion - Unfold Template
• Will we see an updated GAT Toolkit soon?
• GuidancePackage Solution Will Not build
• Where is the Recipe History stored?
• Multiple Project Creation Template
• How do you add a using/reference to a t4
• How can you use T3 templates in VS templ