VB.NET Microsoft.Reporting.WinForms.ReportViewer 未定义
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39392871/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
VB.NET Microsoft.Reporting.WinForms.ReportViewer is not defined
提问by James
I have a VB.NET application that I am trying to get working on our new system. (We have upgraded from Windows server 2003 to 2012) and I have a piece of software that I am unable to fix.
我有一个 VB.NET 应用程序,我正试图在我们的新系统上使用它。(我们已从 Windows Server 2003 升级到 2012)并且我有一个无法修复的软件。
It uses a Microsoft.Reporting.WinForms.ReportViewerfor some reason and it won't run because it is not defined.
它Microsoft.Reporting.WinForms.ReportViewer出于某种原因使用 a并且它不会运行,因为它没有定义。
I checked the reference and it looked like the path was pointing to a file that didn't exist.
我检查了参考,看起来路径指向一个不存在的文件。
I found a download for VS 2010 which is supposed to install the Microsoft.Reporting.WinForms.ReportViewer but it hasn't worked.
我找到了 VS 2010 的下载,它应该安装 Microsoft.Reporting.WinForms.ReportViewer 但它没有工作。
If I copy the error exactly this is what it gives me:
如果我完全复制错误,这就是它给我的:
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
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
I'm running VS Express 2015
我正在运行 VS Express 2015
Please let me know if you need more information.
如果您需要更多信息,请告诉我。
回答by Kyle Moffat
I was having the same issue on one of my projects. The solution I found was in Solution Explorer, Right Click Referencesremove the flagged reference to Microsoft.Reporting.WinForms.ReportViewerthen right click Referencesand re-add Microsoft.ReportViewer.WinForms(can be found by typing winformsin the search bar)
我在我的一个项目中遇到了同样的问题。我找到的解决方案是Solution Explorer,右键单击References删除标记的引用,Microsoft.Reporting.WinForms.ReportViewer然后右键单击References并重新添加Microsoft.ReportViewer.WinForms(可以通过winforms在搜索栏中键入来找到)
This immediately cleared up the Error for me. Best of luck!
这立即为我清除了错误。祝你好运!
回答by HO LI Pin
Visual studio > File menu > Tools > Nuget Package manager > Manage Nuget packages for Solution:
Visual Studio > 文件菜单 > 工具 > Nuget 包管理器 > 管理解决方案的 Nuget 包:
Then browse "Microsoft.Reporting.WinForms" and install it:
然后浏览“Microsoft.Reporting.WinForms”并安装它:
Then press F5 to "start debugging" , and you find error fix.
然后按F5“开始调试”,你会发现错误修复。


