2
Vote

Recipe Framework Error

description

Hi all,
 
Last week I started using the BSF for our new BizTalk 2010 solution. When I wanted to create a new unit test (using the context menu in the solution explorer) I unfortunately encountered the following error: “Microsoft.Practices.RecipeFramework.Library.Actions.AddItemFromStringAction, Microsoft.Practices.RecipeFramework.Library, Version=1.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
 
Reading the error details (below) I discovered that the exception is thrown while trying to load the above mentioned assembly. It appears this assembly isn’t on my machine, but a newer version (2.0.0.0) is… I installed all prerequisites just as described in the manual, but I guess you now get a newer version (or at least newer build) of GAT/GAX then the one BSF is compiled against. I think (and hope) it will be a simple recompile of the binaries that will do the trick…
 
Regards,
Ferdinand

 

 
System.TypeLoadException: Microsoft.Practices.RecipeFramework.Library.Actions.AddItemFromStringAction, Microsoft.Practices.RecipeFramework.Library, Version=1.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ---> System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.Practices.Common.Services.TypeResolutionService.GetAssembly(AssemblyName assemblyName, Boolean throwOnError)
at Microsoft.Practices.Common.Services.TypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
--- End of inner exception stack trace ---
at Microsoft.Practices.Common.Services.TypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.Practices.Common.Services.TypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.Practices.Common.Services.AliasResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.Practices.Common.Services.TypeResolutionService.GetType(String typeName, Boolean throwOnError)
at Microsoft.Practices.RecipeFramework.Recipe.GetInstance[T](ITypeResolutionService resolution, String concreteType)
at Microsoft.Practices.RecipeFramework.Recipe.LoadActionsFromConfiguration(ITypeResolutionService resolution)
at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
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.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()

file attachments

comments

fkuiper wrote Sep 5, 2011 at 10:07 AM

sorry... browser didn't respond but did submit... now this item is here twice.

wrote Sep 6, 2011 at 5:40 AM

wrote Sep 11, 2011 at 2:29 PM

JeanPaulSmit wrote Sep 11, 2011 at 2:29 PM

Thanks for submitting your issue.
However I cannot really understand why you experience the behavior you do, because I have the same v2.0 of the Microsoft.Practices.RecipeFramework.Library on my machine and not v1.4 that the code is referring to.
The unit test generation works anyhow, on my machine.

I did remove the explicit reference to v1.4 though and attached it to this comment.
Can you try this version and let me know the outcome?
If everything works for you with this version, I will update the global download with this version.
Thanks.

fkuiper wrote Sep 12, 2011 at 8:24 AM

Hi Jean-Paul,

To make sure the problem still exists on my machine I tried again this morning and got the same error. I then removed the installed extension and installed the one you attached. Reopened the same solution and tried to add an unit test via the context menu and it worked fine. To validate that it is in fact the changes you made to the package I then remove the updated version and reinstalled the original version again (this should in theory bring back this problem right?). Opened my solution again and guess what... it still worked!

So I'm not sure your changes did the trick... but something made it work for me. Because the original version now also works I’m not sure it would be advisable to update the global download with this upgrade version. Maybe keep it aside till someone else runs into the same problem and can verify for sure that this upgrade version did the trick…

Thanks for your time and effort!

Regards,
Ferdinand

wrote Feb 14, 2013 at 12:59 AM