This is a migrated thread and some comments may be shown as answers.

ValidateXaml" task failed unexpectedly. error

6 Answers 427 Views
GridView
This is a migrated thread and some comments may be shown as answers.
dr
Top achievements
Rank 1
dr asked on 24 Jun 2009, 06:15 PM
Hello,

i am running the latest 2009 trial controls on vs 2008 sp1, i have been able to use the calendar control successfully but when i drop  the grid on the page.xaml and compile i get this error. anyone come across this?


Error    1    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. The system cannot find the file specified.
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)

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Jun 2009, 05:50 AM
Hello dr,

Do you have reference to System.Core Version=2.0.5.0?

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
dr
Top achievements
Rank 1
answered on 25 Jun 2009, 12:49 PM
the reference is there, if i use your calendar control it compiles fine, but when i drop on the grid it gives me that lovely error.
i have read that its an issue with silverlight.dll and i need to uninstall and reinstall everything, but i wanted to check here before i went thru that headache.
0
dr
Top achievements
Rank 1
answered on 29 Jun 2009, 02:37 PM
i solved the problem if anyone else runs into this.

Just add System.Core.dll, System.Windows.dll and system.dll to GAC(From C:\Program Files\Microsoft SDKs\Silverlight\2.0 folder).

i guess the telerik calendar control wasn't referencing this dlls while the grid was.

0
Natália
Top achievements
Rank 1
answered on 18 Aug 2010, 01:53 PM
Hello,

Only to supplement the response, this error can occur when trying to open a project Silverlight3 on a machine in which there is only Silverlight4 installed for visual studio.
So in this case, what happened to me, where the project was set to Silverlight3 and the machine was Silverlight4, just open the project properties and change "Target Silverlight Version" for release Silverlight4, a message will appear asking if you want to change Target Framework for the project click Yes and wait.
In my case, this procedure solved the problem
.
0
Leon
Top achievements
Rank 1
answered on 07 Feb 2011, 07:55 PM
I am working in Silverlight 3, VS2008.

I was using the trial dll's....version --> 2010.2.0924.1030...when we bought the full verison I got the "validate XAML" exception.

and the new dll's that I am using are --> 2010.3.1110.1040..

Please Help
0
Vlad
Telerik team
answered on 08 Feb 2011, 08:23 AM
Hi,

 Can you verify using the debugger where is the invalid XAML?

Best wishes,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
dr
Top achievements
Rank 1
Answers by
Vlad
Telerik team
dr
Top achievements
Rank 1
Natália
Top achievements
Rank 1
Leon
Top achievements
Rank 1
Share this question
or