Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Problem using Silverlight Toolkit
5 replies. Latest Post by JustinAngel on November 25, 2008.
(0)
bivvo
Member
0 points
3 Posts
11-06-2008 1:58 PM |
I have downloaded the latest versions of the silverlight toolkit/sdk. Un-installed all old beta and RC releases. I am now trying to use the Silverlight Toolkit which causes my build to fail. If anyone has any ideas on how to fix this it would be appreciated .
Problem : Cannot Compile when I add a a reference to the Microsoft.Windows.Controls.dll from the Silverlight toolkit.
Error: Error 1 The "ValidateXaml" task failed unexpectedly.System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.File name: 'System.Windows, 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)
Here is my Visual Studio Information:
Microsoft Visual Studio 2008Version 9.0.30729.1 SPMicrosoft .NET FrameworkVersion 3.5 SP1Installed Edition: ProfessionalMicrosoft Silverlight Projects 2008 91605-270-4114515-60788Microsoft Silverlight Projects 2008Version 9.0.30729.146Microsoft Visual Basic 2008 91605-270-4114515-60788Microsoft Visual Basic 2008Microsoft Visual C# 2008 91605-270-4114515-60788Microsoft Visual C# 2008Microsoft Visual Studio 2008 Tools for Office 91605-270-4114515-60788Microsoft Visual Studio 2008 Tools for OfficeMicrosoft Visual Web Developer 2008 91605-270-4114515-60788Microsoft Visual Web Developer 2008Crystal Reports AAJ60-G0MSA4K-68000CFCrystal Reports Basic for Visual Studio 2008
I am at a loss on what to do from here. Any help on why this error is occuring would be appreciated.
Thanks
jwilcox
Participant
1082 points
187 Posts
11-06-2008 2:04 PM |
Hi,I've seen this one before. Can you try adding a reference to the 'System.Core' assembly of your application and rebuilding?
11-06-2008 2:24 PM |
Thanks for the tip. I do have a reference to System.Core. I went ahead and removed then re-added the reference but I am still recieving the error upon compile. Any other ideas?
Amanda W...
All-Star
17241 points
1,466 Posts
11-11-2008 6:23 AM |
Hi,
Try to refer these two threads:
Hope them can help.
11-25-2008 2:38 PM |
Looked at the solution in both links and I am still having the problem. I goto File->New Project->(Web)Silverlight Application
I add the web site to host the application,
Click on Reference in the Application Project and Browse to C:\Program Files\Silverlight ToolKit\bin and add a reference to Microsoft.Windows.Controls.dll
When I try to compile i receive the error listed above.
JustinAngel
Contributor
4415 points
596 Posts
11-25-2008 11:02 PM |
System.Windows.dll just doesn't go missing. This *has* to be one of 2 things:
1. Your Visual studio installation is f***ed up :) It happens, beta software is called "beta" for a reason. Going over your "About" info everything looks in order, you have no Hotfixes, the correct SP1 version and a newer silverlight tools version than the one I'm using, so we're in the clear there. Allow me to suggest that if this is the problem, run a Visual Studio repair and Visual studio Silverlight tools repair and you should be fine.
2. You're not adding references correctly. You're either adding the "Microsoft.Windows.Controls.dll" reference to a .Net CLR project (like maybe trying to add MWC.dll to the asp.net project...?) or trying to add it through the wrong Tab (again, trying to mix between CLRs).If this is the issue, please specify step by step how you start a new project and add a reference until you see this error. Allow me to suggest that you install blend and try using the Silverlight Toolkit dlls from there and than opening the project in Visual studio. That would confirm you are adding the references incorrectly in Visaul studio.