.net升级到4.0之后,出现'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its depen

时间:2022-02-16 17:05:29

 

 

 

 

'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or

one of its dependencies. The system cannot find the file specified

Line 15:     <form id="form1" runat="server">
Line 16: <asp:ScriptManager runat="server" ID="smScriptManager"
EnablePageMethods="true" AjaxFrameworkMode="Enabled">
Line 17: </asp:ScriptManager>
Line 18:
如果你首次登陆的话,这个页面会报黄页,然后提示这里出问题了。。
但是你刷新一下,它就好了。。。
如何解决了,我的方式如下:
1:在MSDN下载最新的Silverlight版本,然后更新。
2:找到类似C:\Program Files\Microsoft Silverlight\4.0.60831.0 
这样的文件夹。找到System.Windows.dll
3:Copy到你的项目中,并进行引用,clean Solution  and Rebuild Solution.
4:错误不再重现。