CS0433: 类型“Microsoft.Reporting.WebForms.ReportViewer”同时存在于“c:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WebForms/8.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WebForms.dll”和“c:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WebForms/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WebForms.dll”中
原因:Web.config文件的自动生成的引用
webconfig里多引用了两个,一个9.0和一个8.0
解决方法:去掉一个。
<add namespace="Microsoft.Reporting.WebForms" assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" tagPrefix="Reporting"/>
最简单的方法,还原webconfig。。。。。。。。
本文介绍了解决CS0433错误的方法,该错误出现在类型“Microsoft.Reporting.WebForms.ReportViewer”同时存在于不同版本的Microsoft.ReportViewer.WebForms.dll中。解决办法是在Web.config文件中移除重复的版本引用。
960

被折叠的 条评论
为什么被折叠?



