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

Error loading window.system.dll

3 Answers 253 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Froggy NNO
Top achievements
Rank 1
Froggy NNO asked on 06 May 2013, 02:56 PM
Hello,

i am having this error on my application  ( Framework 4, Silverlight 5, telerik asp net :2013.1 417, telerik Silverlight 2012.3 1129)
both telerik Silverlight and telerik asp net are on the same application

Server Error in '/XEMii.Web' Application.

Could not load file or assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Le fichier spécifié est introuvable.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Le fichier spécifié est introuvable.

Source Error:

Line 47: <body> Line 48: <form id="form1" runat="server"> Line 49: <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> Line 50: </telerik:RadScriptManager> Line 51: <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="false" />

Source File: c:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\GSPAF_A_dosfac.aspx    Line: 49

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be loaded.

=== Pre-bind state information === LOG: User = AZECULLY\cch LOG: DisplayName = System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e (Fully-specified) LOG: Appbase = file:///C:/XEMii_Source/XEMii/XEMii-3.0.152.0/FrameWorkXEMI/FrameWorkXEMI/ LOG: Initial PrivatePath = C:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\bin Calling assembly : Telerik.Windows.Controls, Version=2012.3.1129.1050, Culture=neutral, PublicKeyToken=5803cfa389c90ce7. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\web.config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e LOG: The same bind was seen before, and was failed with hr = 0x80070002. 

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Le fichier spécifié est introuvable.] 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() +399 System.Web.UI.ScriptManager..ctor() +26 Telerik.Web.UI.RadScriptManager..ctor() +68 ASP.gspaf_a_dosfac_aspx.__BuildControlRadScriptManager1() in c:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\GSPAF_A_dosfac.aspx:49 ASP.gspaf_a_dosfac_aspx.__BuildControlform1() in c:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\GSPAF_A_dosfac.aspx:48 ASP.gspaf_a_dosfac_aspx.__BuildControlTree(gspaf_a_dosfac_aspx __ctrl) in c:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\GSPAF_A_dosfac.aspx:1 ASP.gspaf_a_dosfac_aspx.FrameworkInitialize() in c:\XEMii_Source\XEMii\XEMii-3.0.152.0\FrameWorkXEMI\FrameWorkXEMI\GSPAF_A_dosfac.aspx.cs:912308 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54 System.Web.UI.Page.ProcessRequest() +78 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.gspaf_a_dosfac_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\xemii.web\81328331\489952e6\App_Web_ev1wcm0f.9.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 




Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272             
    

do i miss a reference assembly?

Regards,

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 09 May 2013, 08:51 AM
Hello,

Have you checked whether you have a reference to System.Windows.dll in the Silverlight project? Also please make sure that "Copy Local" setting in the Properties window for this reference is set to true.

If this does not help, please try to clean and rebuild the application.
Let us know how this goes.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Froggy NNO
Top achievements
Rank 1
answered on 13 May 2013, 08:23 AM
Hello,

I did the change on copy local system.window..dll , clean and rebuild the solution and now the application is looking for the version 2.0.5.0  of system.windows.dll .

All my project in the solution are  framework 4.0.

If i click F5 the page is working fine but the problem is that the users randomly got the exception


Server Error in '/XEMII_3.0.152.0' Application.

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 47: <body>
Line 48:     <form id="form1" runat="server">
Line 49:     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
Line 50:     </telerik:RadScriptManager>
Line 51:     <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="false" Skin="Office2010Silver" />

Source File: d:\Program Files (x86)\XEMii\Web 3.0.152.0\GSPAF_A_dosfac.aspx    Line: 49

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   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() +399
   System.Web.UI.ScriptManager..ctor() +26
   Telerik.Web.UI.RadScriptManager..ctor() +50
   ASP.gspaf_a_dosfac_aspx.__BuildControlRadScriptManager1() in d:\Program Files (x86)\XEMii\Web 3.0.152.0\GSPAF_A_dosfac.aspx:49
   ASP.gspaf_a_dosfac_aspx.__BuildControlform1() in d:\Program Files (x86)\XEMii\Web 3.0.152.0\GSPAF_A_dosfac.aspx:48
   ASP.gspaf_a_dosfac_aspx.__BuildControlTree(gspaf_a_dosfac_aspx __ctrl) in d:\Program Files (x86)\XEMii\Web 3.0.152.0\GSPAF_A_dosfac.aspx:1
   ASP.gspaf_a_dosfac_aspx.FrameworkInitialize() in d:\Program Files (x86)\XEMii\Web 3.0.152.0\GSPAF_A_dosfac.aspx.cs:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.gspaf_a_dosfac_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\xemii_3.0.152.0\9caca6ef\98744be9\App_Web_cnaunwmm.36.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 

On event viewer on the server :

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 15/05/2013 10:53:07 
Event time (UTC): 15/05/2013 08:53:07 
Event ID: 380f430b918d44b2b344e39f00a16f8d 
Event sequence: 14 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT/XEMII_LIGHT-4-130130814879744702 
    Trust level: Full 
    Application Virtual Path: /XEMII_LIGHT 
    Application Path: D:\Program Files (x86)\XEMii\Web_light\ 
    Machine name: EAM-VMGED03 
 
Process information: 
    Process ID: 5040 
    Process name: w3wp.exe 
    Account name: GROUPE\xdocadm 
 
Exception information: 
    Exception type: FileLoadException 
    Exception message: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at 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)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit)
   at System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly)
   at System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly()
   at System.Web.UI.ScriptManager..ctor()
   at Telerik.Web.UI.RadScriptManager..ctor()
   at ASP.gspaf_a_dosfac_aspx.__BuildControlRadScriptManager1() in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx:line 49
   at ASP.gspaf_a_dosfac_aspx.__BuildControlform1() in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx:line 48
   at ASP.gspaf_a_dosfac_aspx.__BuildControlTree(gspaf_a_dosfac_aspx __ctrl) in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx:line 1
   at ASP.gspaf_a_dosfac_aspx.FrameworkInitialize() in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx.cs:line 912308
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.gspaf_a_dosfac_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\xemii_light\966066c8\428cf70d\App_Web_u3t5lrku.2.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 
 
Request information: 
    Request URL: http://eam-vmged03.groupe.dom/xemii_light/GSPAF_A_dosfac.aspx 
    Request path: /xemii_light/GSPAF_A_dosfac.aspx 
    User host address: 10.27.249.41 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: GROUPE\xdocadm 
 
Thread information: 
    Thread ID: 6 
    Thread account name: GROUPE\xdocadm 
    Is impersonating: False 
    Stack trace:    at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at 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)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit)
   at System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly)
   at System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly()
   at System.Web.UI.ScriptManager..ctor()
   at Telerik.Web.UI.RadScriptManager..ctor()
   at ASP.gspaf_a_dosfac_aspx.__BuildControlRadScriptManager1() in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx:line 49
   at ASP.gspaf_a_dosfac_aspx.__BuildControlform1() in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx:line 48
   at ASP.gspaf_a_dosfac_aspx.__BuildControlTree(gspaf_a_dosfac_aspx __ctrl) in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx:line 1
   at ASP.gspaf_a_dosfac_aspx.FrameworkInitialize() in d:\Program Files (x86)\XEMii\Web_light\GSPAF_A_dosfac.aspx.cs:line 912308
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.gspaf_a_dosfac_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\xemii_light\966066c8\428cf70d\App_Web_u3t5lrku.2.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details: 

0
Yana
Telerik team
answered on 16 May 2013, 07:42 AM
Hello,

Please check the suggestions posted here and here.
Note that the important part in the exception is " The located assembly's manifest definition does not match the assembly reference.", you could try opening the Silverlight .proj file in a text editor, find the reference to System.Windows.dll and delete all the additional settings.

I hope this helps.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScriptManager and StyleSheetManager
Asked by
Froggy NNO
Top achievements
Rank 1
Answers by
Yana
Telerik team
Froggy NNO
Top achievements
Rank 1
Share this question
or