积极答复者
silverlight2报错,请问什么原因

问题
-
Error 5 The "ValidateXaml" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. 系统找不到指定的文件。
File name: 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
at System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at 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)
at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(Assembly assembly, RuntimeType caType)
at System.Reflection.Assembly.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
at MS.Internal.Xaml.MS.Impl.XamlSystemBinding.AddPairsFromAssembly(XamlSchemaContext schemaContext, Assembly asm, String uri, List`1 pairs)
at MS.Internal.Xaml.MS.Impl.XamlSystemBinding.SearchForXamlNamespace(XamlSchemaContext schemaContext, String uriString, IEnumerable`1 referenceAssemblies)
at MS.Internal.Xaml.XamlSchemaContext.GetXamlNamespace(String xmlns, Assembly localAssembly)
at MS.Internal.Xaml.XamlSchemaContext.GetXamlNamespace(String xmlns)
at MS.MarkupCompiler.ValidationPass.ValidateXaml(String fileName, Assembly[] assemblies, Assembly callingAssembly, TaskLoggingHelper log, Boolean shouldThrow)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute()
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute()
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)SilverlightApplication2
答案
-
不是版本问题,我装的sl2,运行RadControls for Silverlight Q1 2009 Demo Application是没有问题的,但是一引用它的控件就这个错误。
第三方开发的控件还是去问下第三方的技术支持比较好.这些付费控件,应该会提供相应的支持的.
这个不是Silverlight本身的问题,请仔细阅读第三方的开发手册之后再开发程式.
建议还是用一些大众开源的控件,比如Silverlight Tools Kit来讨论:)- 已标记为答案 Allen Chen - MSFTModerator 2009年6月26日 7:04
-
此问题已解决!
解决方法:- Open the Visual Studio 2008 Command Prompt.
- Execute devenv /ResetSkipPkgs in the command prompt.
This switch clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages. This switch also starts Visual Studio.- Close Visual Studio and then execute devenv /Setup in the command prompt.
This switch forces Visual Studio to merge the resource metadata that describes menus, toolbars, and command groups from all VSPackages available- Open Visual Studio and have fun.
- 或者 Just add System.Core.dll, System.Windows.dll and system.dll to GAC(From C:\Program Files\Microsoft Silverlight\2.0.40115.0 folder)
呵呵- 已标记为答案 www_scott 2009年9月21日 3:33
全部回复
-
不是版本问题,我装的sl2,运行RadControls for Silverlight Q1 2009 Demo Application是没有问题的,但是一引用它的控件就这个错误。
第三方开发的控件还是去问下第三方的技术支持比较好.这些付费控件,应该会提供相应的支持的.
这个不是Silverlight本身的问题,请仔细阅读第三方的开发手册之后再开发程式.
建议还是用一些大众开源的控件,比如Silverlight Tools Kit来讨论:)- 已标记为答案 Allen Chen - MSFTModerator 2009年6月26日 7:04
-
此问题已解决!
解决方法:- Open the Visual Studio 2008 Command Prompt.
- Execute devenv /ResetSkipPkgs in the command prompt.
This switch clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages. This switch also starts Visual Studio.- Close Visual Studio and then execute devenv /Setup in the command prompt.
This switch forces Visual Studio to merge the resource metadata that describes menus, toolbars, and command groups from all VSPackages available- Open Visual Studio and have fun.
- 或者 Just add System.Core.dll, System.Windows.dll and system.dll to GAC(From C:\Program Files\Microsoft Silverlight\2.0.40115.0 folder)
呵呵- 已标记为答案 www_scott 2009年9月21日 3:33