0

我在服务器上遇到问题,它说 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].
4

1 回答 1

0

您将在引用文件夹中找到该 dll:

Copy local = true

在程序集上设置此属性。

构建,它应该可以工作。

如果不:

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

编辑:

尝试使用这个脚本管理器:

从这里下载

工具包脚本管理器

于 2013-08-27T07:48:21.440 回答