经过一个干净的安装,我的项目没有编译,因为对DLL参考被打破,所以我删除它,并再次添加它,那么该网页,其中的ReportViewer用来给了一个分析器错误:
The base class includes the field 'rprtReportsViewer', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer).
我发现版本号为网页给一个刚刚加入我不同的引用:
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
我改变了版本9.0.0.0,这时候有一个编译器错误,当我刷新了页:
CS0433: The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'
我然后搜索“Microsoft.ReportViewer”的解决方案,发现编译的详细引用。配置:
<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
我改变了这里的版本号也和它停止错误
但告诉我一件事你是如何从asp.net应用程序中删除引用的? – 2014-01-15 07:45:49