无法加载文件或程序集'System.Windows,Version = 2.0.5.0,Culture = neutral,PublicKeyToken = 7cec85d7bea7798e'或其依赖项之一。

时间:2013-08-27 07:46:27

标签: asp.net

我在服务器上遇到问题,它说无法找到System.Windows.dll。在第一次执行时,它正在抛出异常,但在刷新页面之后它正常工作。

我发现,这是因为ScriptManager而发生的。我的页面上有ScriptManager,请参阅以下错误:

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. 
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=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

Source Error: 


Line 148:        <img src="../../Images/loading.gif" width="500" />
Line 149:    </div>
Line 150:    <asp:ScriptManager ID="ScriptManager1" runat="server">
Line 151:    </asp:ScriptManager>
Line 152:    <table border="0" cellspacing="0" cellpadding="0" width="100%">


Source File: d:\xyz\CRM\Reports\zyz.aspx    Line: 150 

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].

1 个答案:

答案 0 :(得分:0)

你会在参考文件夹中找到dll:

Copy local = true

在装配体上设置此属性。

构建,它​​应该可以工作。

如果不是:

将此dll复制到项目中并将副本设置为输出目录=如果较新则复制

修改

尝试使用此scriptmanager:

Download from here

ToolkitScriptManager

相关问题