System.IO.FileNotFoundException: 未能加载文件或程序集“System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e”或它的某一个依赖项。系统找不到指定的文件。
文件名:“System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e”
在 System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
在 System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
在 System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
在 System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
在 System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
在 System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
在 MS.Internal.Xaml.Schema.ClrType.GetCustomAttribute(Type attrType)
在 MS.Internal.Xaml.Schema.ClrType.LookupRuntimeNameProperty()
在 MS.Internal.Xaml.Schema.ClrType.LookupPropertyValue(NonBoolTypeValidBits typeBit)
在 MS.Internal.Xaml.Schema.ClrType.get_RuntimeNamePropertyCore()
在 MS.Internal.Xaml.Parser.XamlAttribute.Initialize(XamlParserContext context, XamlType ownerType, XamlNamespace ownerNamespace)
在 MS.Internal.Xaml.Parser.XamlScanner.PostprocessAttributes(XamlScannerNode node)
在 MS.Internal.Xaml.Parser.XamlScanner.ReadObjectElement(XamlName name, Boolean isEmptyTag)
在 MS.Internal.Xaml.Parser.XamlScanner.ReadElement()
在 MS.Internal.Xaml.Parser.XamlScanner.DoXmlRead()
在 MS.Internal.Xaml.Parser.XamlScanner.Read()
在 MS.Internal.Xaml.Parser.XamlPullParser.<P_PropertyElement>d__31.MoveNext()
在 MS.Internal.Xaml.Parser.XamlPullParser.<P_ElementBody>d__23.MoveNext()
在 MS.Internal.Xaml.Parser.XamlPullParser.<P_Element>d__7.MoveNext()
在 MS.Internal.Xaml.Parser.XamlPullParser.<P_ElementContent>d__39.MoveNext()
在 MS.Internal.Xaml.Parser.XamlPullParser.<P_ElementBody>d__23.MoveNext()
在 MS.Internal.Xaml.Parser.XamlPullParser.<P_Element>d__7.MoveNext()
在 MS.Internal.Xaml.Parser.XamlPullParser.<Parse>d__0.MoveNext()
在 MS.Internal.Xaml.TextReaderEnumerator.MoveNext()
在 MS.Internal.Xaml.XamlTextReader.Read()
在 MS.MarkupCompiler.ValidationPass.ValidateXaml(String fileName, Assembly[] assemblies, Assembly callingAssembly, TaskLoggingHelper log, Boolean shouldThrow)
在 Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
在 Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
在 Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()
在 Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
解决:
在xaml项目中加入引用System.Runtime.Serialization或者重新加入一下

浙公网安备 33010602011771号