index > Visual Studio Guidance Automation Toolkit > Error "System.ArgumentNullException: Key cannot be null"...

Error "System.ArgumentNullException: Key cannot be null"...

Hi,

I have an error in my package.


I add a solution I add an project : ok
I add an item project (ex BizComponents): ok
When i add the same item project (BizComponents), so i get this error

--------------------------------------------------------------------------------

System.ArgumentNullException: Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.get_Item(Object key)
at Microsoft.Practices.WizardFramework.WizardGatheringService.GetWizardConfiguration(XmlElement data)
at Microsoft.Practices.WizardFramework.WizardGatheringService.Microsoft.Practices.Common.Services.IValueGatheringService.Execute(XmlElement data, Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.TemplateGatheringService.Microsoft.Practices.Common.Services.IValueGatheringService.Execute(XmlElement serviceData, Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunStarted(Object automationObject, Dictionary`2 replacementsDictionary, WizardRunKind runKind, Object[] customParams)

--------------------------------------------------------------------------------

this is my vstemplate :

<VSTemplate Version="2.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">

<TemplateData>

<Name>Empty Class Business components</Name>

<Description>A class receiving arguments for dynamic code generation</Description>

<Icon Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="4515" />

<ProjectType>CSharp</ProjectType>

<SortOrder>10</SortOrder>

<DefaultName>Class.cs</DefaultName>

</TemplateData>

<TemplateContent>

<References>

<Reference>

<Assembly>System</Assembly>

</Reference>

<Reference>

<Assembly>System.Data</Assembly>

</Reference>

<Reference>

<Assembly>System.Xml</Assembly>

</Reference>

<Reference>

<Assembly>BICoreLib</Assembly>

</Reference>

<Reference>

<Assembly>mscorlib</Assembly>

</Reference>

</References>

<ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">ClassBusinessComponents.cs</ProjectItem>

</TemplateContent>

<WizardExtension>

<Assembly>Microsoft.Practices.RecipeFramework.VisualStudio, Version=1.0.51206.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>

<FullClassName>Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate</FullClassName>

</WizardExtension>

<WizardData>

<Template xmlns="http://schemas.microsoft.com/pag/gax-template"

SchemaVersion="1.0"

Recipe="NewItemClassBusinessComponents">

<References>

</References>

</Template>

</WizardData>

</VSTemplate>

-----------------------------------------------------

and my Recipe

<Recipe Name="NewItemClassBusinessComponents" Recurrent="false">

<xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

<Caption>Collects information from the user</Caption>

<Description>

This recipe doesn't perform any actions, but showcases the features

available to build highly functional wizards by taking advantage of

type converters and editors.

</Description>

<HostData>

<Icon ID="1429"/>

<CommandBar Name="Project" />

</HostData>

<Arguments>

<!-- Example of automatic UITypeEditor provided by .NET, and a custom value provider -->

<Argument Name="Date" Type="System.DateTime">

<ValueProvider Type="BusinessInteractif.Application.Architecture2005.ValueProviders.DateNowValueProvider, BI.Application.Architecture2005" />

</Argument>

<!-- The following two arguments are not shown to the user, but collaborate to retrieve a value -->

<Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

<ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library" />

</Argument>

<Argument Name="TargetNamespace">

<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library"/>

<!-- Shows an argument with a custom type defined in-place, and not collected by the wizard -->

<ValueProvider Type="Evaluator" Expression="$(CurrentProject.Properties.Item('DefaultNamespace').Value).Generated" />

</Argument>

<Argument Name="Project" Type="EnvDTE.Project, EnvDTE" Required="false">

<!-- Converter ensures that a string representation of a project is valid, and also allows conversion to/from it to the Project instance. -->

<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.ProjectConverter, Microsoft.Practices.RecipeFramework.Library" />

</Argument>

</Arguments>

</Recipe>

dgavarin
This is a known issue in the current release. Try adding an empty <GatheringServiceData> elemet on the recipe.



Daniel Cazzulino [Solutions Architect MVP]
kzu
This is a known bug in GAX.
You can solve it by adding an empty <GatheringServiceData> element.

Let me know if it works ok.



Daniel Cazzulino [Solutions Architect MVP]
kzu

thanx

Daniel GAVARIN

dgavarin
reply 4

You can use google to search for other answers

 

More Articles

• Wizard size and colors
• What is the benefit of using GAT versus implementing patterns
• Guidance Automation Extensions and Toolkit: June 2006 Release
• Access Denied (On Windows XP SP2)
• Making compiling faster!!!
• GAT Problem
• How to Create Project Reference and App_Code from Web Sevice?
• How to gather data without wizard
• How can you skip the UI when you run a recipe?
• When is the next release for GAT???
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Debugging your packages.
• Call a recipe
• Package works when manually registered b
• What is the benefit of using GAT versus
• new to GAT
• GAT on Visual Studio Release Candidate
• T4 in a custom tool
• Where is the Recipe History stored?
• Execute Action when content of Combobox
• Will we see an updated GAT Toolkit soon?
• Update guidance already installed
• Has anyone written a MSI bootstrapper fo
• how begin?.. please help, I'm lost
• How can you skip the UI when you run a r
• Reuse Projects and Recipes

Hot Articles

• Sharing gpState in TFS Source Control
• Set an "Overview" HTML page to
• How to add template menu item to custom
• Create Add DataSet recipe
• Visual Studio hangs when I install the T
• Can we checkout file under ClearCase as
• Package version
• Custom UnfoldTemplate
• How do you enable delay signing on a web
• Registering guidance with the experiment
• Reality Check?
• Making compiling faster!!!
• Can you build a guidance package in VB?
• Bullet points for building a guidance au
• Beta 2 Class Wizard does not work

Recommend Articles

• Can you build a guidance package in VB?
• RegexMatchStringConverter
• Debugging your packages.
• Minor bug in VszWizard.FindAddItem
• Wizard size and colors
• Guidance Automation Extensions and Toolk
• Is there a way to use the T3 engine as a
• Create New Project Hangs
• Error "System.ArgumentNullException
• ProjectReference
• Guidance actions are gone
• Referencing a generic class with a t4 te
• Problem adding reference to CSharp proje
• Registering guidance with the experiment
• How to Create Project Reference and App_