VB.NET Microsoft.Reporting.WinForms.ReportViewer 未定义

Jam*_*mes 5 vb.net reference

我有一个 VB.NET 应用程序,我正试图在我们的新系统上使用它。(我们已从 Windows Server 2003 升级到 2012)并且我有一个无法修复的软件。

Microsoft.Reporting.WinForms.ReportViewer出于某种原因使用 a并且它不会运行,因为它没有定义。

我检查了参考,看起来路径指向一个不存在的文件。

我找到了 VS 2010 的下载,它应该安装 Microsoft.Reporting.WinForms.ReportViewer 但它没有工作。

如果我完全复制错误,这就是它给我的:

Severity Code Description Project File Line Suppression State Error BC30002 Type 'Microsoft.Reporting.WinForms.ReportViewer' is not defined. project C:\DATA\svn\project\trunk\project\frmMain.Designer.vb 195 Active

我正在运行 VS Express 2015

如果您需要更多信息,请告诉我。

HO *_*Pin 7

Visual Studio > 文件菜单 > 工具 > Nuget 包管理器 > 管理解决方案的 Nuget 包:

截图1

然后浏览“Microsoft.Reporting.WinForms”并安装它:

截图2

然后按F5“开始调试”,你会发现错误修复。


Kyl*_*fat 4

我的一个项目也遇到了同样的问题。我找到的解决方案是Solution Explorer,右键单击References删除标记的引用,Microsoft.Reporting.WinForms.ReportViewer然后右键单击References并重新添加Microsoft.ReportViewer.WinForms(可以通过winforms在搜索栏中键入找到)

这立即为我清除了错误。祝你好运!