FileLoadException故障排除

时间:2013-02-03 06:32:33

标签: .net

我使用System.Xaml来序列化工作流,我从我的来自System.Xaml.dll程序集的测试类中得到以下异常。这是奇怪的,因为它之前一直在工作,它突然停止工作。我猜我可能安装了一些导致冲突的新程序集。我的问题是如何确定试图加载哪个程序集,以及加载时预期的版本。我猜测Microsoft.Activities引用的是System.Workflow.Activities的错误版本,但我不知道它需要哪一个。

System.IO.FileLoadException:无法加载文件或程序集“Microsoft.Activities,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35”或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (HRESULT异常:0x80131040)

at System.Signature.GetSignature(Void * pCorSig,Int32 cCorSig,RuntimeFieldHandleInternal fieldHandle,IRuntimeMethodInfo methodHandle,RuntimeType declaringType)    在System.Reflection.RuntimeMethodInfo.get_Signature()    在System.Reflection.RuntimeMethodInfo.GetParametersNoCopy()    在System.Reflection.RuntimePropertyInfo.GetIndexParametersNoCopy()    在System.Reflection.RuntimePropertyInfo.GetIndexParameters()    在System.Xaml.Schema.TypeReflector.FilterProperties(PropertyInfo [] propList,List 1 knownMembers, Boolean skipKnownNegatives) at System.Xaml.Schema.TypeReflector.LookupAllMembers(ref ICollection 1 newProperties,ref ICollection 1 newEvents, ref List 1 knownMembers)    在System.Xaml.XamlType.LookupAllMembers()    在System.Xaml.XamlType.GetAllMembers()    在System.Xaml.XamlObjectReader.ObjectMarkupInfo.GetXamlSerializableProperties(XamlType类型,SerializerContext上下文)    在System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(Object value,SerializerContext context,ParameterInfo [] methodParameters,XamlType xamlType)    在System.Xaml.XamlObjectReader.ObjectMarkupInfo.AddRecordMembers(对象值,SerializerContext上下文,TypeConverter转换器)    在System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObjectInternal(对象值,SerializerContext上下文,TypeConverter转换器)    在System.Xaml.XamlObjectReader.ObjectMarkupInfo.ForObject(对象值,SerializerContext上下文,TypeConverter instanceConverter,布尔isRoot)    在System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequenceItems(Object sourceOrValue,XamlMember属性,XamlType xamlType,SerializerContext context,Boolean allowReadOnly)    at System.Xaml.XamlObjectReader.MemberMarkupInfo.ForSequence(Object source,XamlMember property,SerializerContext context,Boolean isAttachable)

持续了很长时间......

1 个答案:

答案 0 :(得分:0)

我能够通过下载最新版本的工作流程管理器来解决问题。我想我更新了Visual Studio 2012而没有更新这个库。