我正在.net 3.5中创建水晶报表,但收到以下错误..
问题描述:
无法加载文件或程序集``System.Web.Extensions,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35''或其依赖项之一.找到的程序集的清单定义与
不匹配
背后的代码
Could not load file or assembly ''System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' or one of its dependencies. The located assembly''s manifest definition does not match the
Code Behind
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument reportdocument = new ReportDocument();
reportdocument.Load(Server.MapPath("CrystalReport.rpt"));
CrystalReportViewer1.ReportSource = reportdocument;
}
来源详细信息
source details
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="True" EnableDatabaseLogonPrompt="False" Height="1039px"
ReportSourceID="CrystalReportSource1" Width="901px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport.rpt">
</Report>
</CR:CrystalReportSource>
</div>
答
http://forums.asp.net /t/1118954.aspx [ ^ ]
http: //stackoverflow.com/questions/7723489/could-not-load-file-or-assembly-system-web-extensions-version-1-0-61025-0-erro [
http://forums.asp.net/t/1118954.aspx[^]
http://stackoverflow.com/questions/7723489/could-not-load-file-or-assembly-system-web-extensions-version-1-0-61025-0-erro[^]
Check the links for possible solutions.hope it will help you to resolve the problem...
我认为您使用的是2.0框架&现在您已将该项目转换为3.5框架.
因此,您的应用程序正在寻找System.Web.Extensions.dll
(2.0框架版本).要解决此问题,请从web.config&中删除元素<sectiongroup name="system.web.extensions" ........=""></sectiongroup>
(2.0框架版本).使用添加引用将System.Web.Extensions.dll
(3.5框架版本)文件添加到您的应用程序.
I think you were using the 2.0 framework & now you have converted that project into 3.5 framework.
So your application is looking forSystem.Web.Extensions.dll
(2.0 framework version). To fix this, remove the element<sectiongroup name="system.web.extensions" ........=""></sectiongroup>
(2.0 framework version) from web.config & Add theSystem.Web.Extensions.dll
(3.5 framework version) file to your application using Add Reference.