In a nutshell, my problem is this:
I have value provider returning an object of custom type iAnywhere.RfidNet.Core.RnServiceInfo. Later on I have an action consuming this object. I create a project using the relevant recipe in VS2k8 and attempt to run the recipe: an error is thrown saying, "Value iAnywhere.RfidNet.Core.RnServiceInfo specified for argument newControllerInfo can't be converted to the argument type iAnywhere.RfidNet.Core.RnServiceInfo." (Full error text below).
The weird bit:
The code is simply stuff I've migrated from Visual Studio 2005 to Visual Studio 2008. The recipe in question works just fine in the 2005 package. What's more, my testing shows that the RnServiceInfo object returned by the value provider contains exactly what I expect it to; everything up to the point where I exit my value provider works just fine.
The *really* weird bit:This error only occurs when the project is first created; closing and reopening the project makes the recipe work just fine. That is, if I create the project and run the recipe I get the below error. If I create the project, close the project and reopen the project (even without closing Visual Studio 2008) then run the recipe it functions fine.
Any ideas on what could be causing this or workarounds I might try? I'm completely stumped.
Text of Error Message
Microsoft.Practices.RecipeFramework.ValueProviderException: An exception occurred during the binding of reference or execution of recipe AddNewController. Error was: An error happened while calling the value provider or evaluating the default value of argument newControllerInfo..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.ArgumentException: Value iAnywhere.RfidNet.Core.RnServiceInfo specified for argument newControllerInfo can't be converted to the argument type iAnywhere.RfidNet.Core.RnServiceInfo.
at Microsoft.Practices.RecipeFramework.Services.DictionaryService.SetValue(Object key, Object value)
at Microsoft.Practices.RecipeFramework.Recipe.CallProviders(IDictionary providers, IDictionaryService readonlyArguments, IDictionaryService arguments, Boolean isBefore)
--- End of inner exception stack trace ---
at Microsoft.Practices.RecipeFramework.Recipe.CallProviders(IDictionary providers, IDictionaryService readonlyArguments, IDictionaryService arguments, Boolean isBefore)
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(IAssetReference reference)
at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
at Microsoft.Practices.RecipeFramework.VisualStudio.VsBoundReference.OnExecute()
at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()