error CS0234: 命名空间“Microsoft”中不存在类型或命名空间名称“Reporting”(是否缺少程序集引用?)

之前的项目是在VS2008下面编辑的,在VS2012下面运行时出现未能加载文件或程序集Microsoft.ReportViewer.WebForms  错误”,但是我已经添加了Microsoft.ReportViewer.WebForms 的引用,经过一段艰难的探索,最后才明白是由于ReportViewer的版本由10升到11造成的,解决方法如下:

1.添加Microsoft.ReportViewer.WebForms的引用

2.在web.config中的   标签下

将  Version=9.0.0.0 改为   Version=11.0.0.0

3. 在 reportingviewer 的页面中将 Register assembly 中的 Version=9.0.0.0,改为 Version=11.0.0.0
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

你可能感兴趣的:(error CS0234: 命名空间“Microsoft”中不存在类型或命名空间名称“Reporting”(是否缺少程序集引用?))