經過一個乾淨的安裝,我的項目沒有編譯,因爲對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