Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB.NET Microsoft.Reporting.WinForms.ReportViewer is not defined

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.

It uses a Microsoft.Reporting.WinForms.ReportViewer for some reason and it won't run because it is not defined.

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.

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

I'm running VS Express 2015

Please let me know if you need more information.

like image 588
James Avatar asked Sep 08 '16 13:09

James


2 Answers

Visual studio > File menu > Tools > Nuget Package manager > Manage Nuget packages for Solution:

screenshot1

Then browse "Microsoft.Reporting.WinForms" and install it:

screenshot2

Then press F5 to "start debugging" , and you find error fix.

like image 81
HO LI Pin Avatar answered Nov 14 '22 00:11

HO LI Pin


I was having the same issue on one of my projects. The solution I found was in Solution Explorer, Right Click References remove the flagged reference to Microsoft.Reporting.WinForms.ReportViewer then right click References and re-add Microsoft.ReportViewer.WinForms (can be found by typing winforms in the search bar)

This immediately cleared up the Error for me. Best of luck!

like image 24
Kyle Moffat Avatar answered Nov 13 '22 23:11

Kyle Moffat