C# SSRS-报表查看器编译错误
当我想用VisualStudio运行报表查看器时,它会导致以下错误 ========================================================================= 编译错误 描述:编译服务此请求所需的资源时出错。请查看以下特定错误详细信息,并适当修改源代码 编译器错误消息:CS0433:类型 “Microsoft.Reporting.WebForms.ReportViewer”在这两个版本中都存在 'c:\Windows\assembly\GAC\MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0\Uuu b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' 和 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845DCD80CC91\Microsoft.ReportViewer.WebForms.DLL' 源错误:C# SSRS-报表查看器编译错误,c#,asp.net,webforms,ssrs-2008,C#,Asp.net,Webforms,Ssrs 2008,当我想用VisualStudio运行报表查看器时,它会导致以下错误 ========================================================================= 编译错误 描述:编译服务此请求所需的资源时出错。请查看以下特定错误详细信息,并适当修改源代码 编译器错误消息:CS0433:类型 “Microsoft.Reporting.WebForms.ReportViewer”在这两个版本中都存在 'c:\Windows\assembly\GA
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::Microsoft.Reporting.WebForms.ReportViewer @__BuildControlReportViewerSummary() {
global::Microsoft.Reporting.WebForms.ReportViewer @__ctrl;
这是不是意味着我丢失了.dll文件
谢谢。该问题与缺少DLL文件完全无关,而是与同一目录(%Windows%\assembly)中不同DLL文件中存在的相同
ReportViewer
命名空间有关。尝试以下解决方案:
\u bin\u deployableAssemblies
目录中较旧版本的ReportViewer
。删除与之相关的所有文件,并使用Microsoft.ReportViewer.11.0引用Microsoft.ReportViewer.WebForms
命名空间的重复声明,如果存在,请删除旧的声明qualifyAssembly
元素:
<qualifyAssembly partialName="Microsoft.ReportViewer.WebForms" fullName="Microsoft.ReportViewer.WebForms,version=11.0.0.0,culture=neutral,publicKeyToken=89845dcd8080cc91" />
Microsoft.ReportViewer.WebForms
命名空间相关的所有引用,清理整个解决方案(删除引用到旧版本的DLL文件),添加具有最新版本的新引用,然后重新生成解决方案文件。此外,您还可以尝试从程序集目录中删除/卸载一个冲突的DLL文件PublicKeyToken
属性值,因此bindingRedirect
节点中的dependentAssembly
技巧不起作用
与CS0433相关的问题: