Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > VS2k8 Type Conversion Issue (GAX/GAT Feb. 2008)
 

VS2k8 Type Conversion Issue (GAX/GAT Feb. 2008)

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

Anonymous72473293  Thursday, April 24, 2008 7:12 PM
Hi Lycur,

yes, It's weird. In the exception trace I can't see anything. You say that you've a really simple and small package so if you want you can send me it by mail to jes AT clariusconsulting.net. I'll try to find out what's happening with that.

hth.
jose.
Jose Escrich  Friday, May 16, 2008 5:50 PM
Hi Lycur,

yes, It's weird. In the exception trace I can't see anything. You say that you've a really simple and small package so if you want you can send me it by mail to jes AT clariusconsulting.net. I'll try to find out what's happening with that.

hth.
jose.
Jose Escrich  Friday, May 16, 2008 5:50 PM

You can use google to search for other answers

Custom Search

More Threads

• Download not available
• Trusted Assembly referenace Problem
• Re: How to develop a design center for my website.
• GAT Wrapper
• Building a first Guidance Package
• Code generation based on checked nodes within a treeview.
• Substitue for Windows Service in Web Application
• Wizard - Field with optional value
• Error installing GAX
• How do you add a using/reference to a t4 template?