【问题标题】:Failed to create component 'ReportViewer'. The error message follows:未能创建组件“ReportViewer”。错误信息如下:
【发布时间】:2020-05-31 12:17:39
【问题描述】:

我无法解决此异常消息,请帮助我。

未能创建组件'ReportViewer'

错误信息如下:

'System.InvalidCastException:[A]Microsoft.Reporting.WinForms.ReportViewer 无法转换为 [B]Microsoft.Reporting.WinForms.ReportViewer。
类型 A 源自 'Microsoft.ReportViewer.WinForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 在位置 'C:\Users\ComputerName\AppData\Local\Microsoft\VisualStudio\16.0 _81430e9d\ProjectAssemblies\tmy4po5j01\Microsoft.ReportViewer.WinForms.dll'。
类型 B 源自 'Microsoft.ReportViewer.WinForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 在位置 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY \COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\SSAS\Microsoft.ReportViewer.WinForms.dll'。

在 Microsoft.Reporting.WinForms.ReportViewerDesigner.get_ActionLists()
在 System.ComponentModel.Design.ComponentDesigner.CDDesignerCommandSet.GetCommands(字符串名称)
在 System.ComponentModel.Design.DesignerCommandSet.get_ActionLists()
在 System.Com...'

【问题讨论】:

  • 您能否提供更多关于您所做的工作的信息?

标签: c# .net winforms


【解决方案1】:

更新 nuget 包后,我遇到了同样的问题。如果我构建解决方案,报告仍然有效。我无法在 Visual Studio 中编辑它们,然后我在设计器中收到此错误,

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,为了解决它,我必须安装相同版本的 Reporting Services 和 SQL Server Types 包。查看图片了解版本详情。

    Image

    【讨论】:

      猜你喜欢
      • 2022-06-10
      • 1970-01-01
      • 1970-01-01
      • 2012-04-18
      • 1970-01-01
      • 2020-07-25
      • 2019-12-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多