Hello,
In my web application, I have a master page with a RadScriptManager control. I'm getting the following error on page load:
Could not load file or assembly 'System.Windows,Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' orone of its dependencies. The system cannot find the file specified.
Based on the stack trace, the error appears to be thrown from the RadScriptManager constructor:
[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.]
System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32
typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[]
typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +180
System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[]
genericMethodArguments) +192 System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord
caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule,
MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[]
attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean&
ctorHasParameters, Boolean& isVarArg) +115
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken,
Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean
isDecoratedTargetSecurityTransparent) +426 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly
assembly, RuntimeType caType) +103
System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76
System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +388
System.Web.UI.ScriptManager..ctor() +26
Telerik.Web.UI.RadScriptManager..ctor() +14
The error only occurs the first time I load a page after a build of the application. As soon as I refresh the page, the error goes away and the application functions as expect.
The error started occurring as soon as I added a Silverlight 3 application in my web app project.
Why are RadScriptManager and the .NET ScriptManager attempting to load a Silverlight dll? Obviously, this dll is not in the bin directory of the web app. Any ideas as to how I can make this error go away?
I'm using VS 2010, .NET 4.0, Silverlight 3, and Telerik RadControls for ASP.NET Ajax version 2010.1.415.40.
Thanks,
Andy