Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=15.0.0.0

  • Thread starter Thread starter lorenzolowrince
  • Start date Start date
L

lorenzolowrince

Guest
I get the following error when i try to use the Report Viewer.

System.InvalidOperationException
HResult=0x80131509
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source=RMS
StackTrace:
at RestaurantManagementSystem.My.MyProject.MyForms.Create__Instance__[T](T Instance) in :line 190
at RestaurantManagementSystem.My.MyProject.MyForms.get_Form4()
at RestaurantManagementSystem.My.MyApplication.OnCreateMainForm() in C:\Users\Lorenzo\source\repos\RestaurantManagementSystem\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at RestaurantManagementSystem.My.MyApplication.Main(String[] Args) in :line 81

Inner Exception 1:
FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Inner Exception 2:
FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


I am using the following VS version.

1570278.jpg


I have also included the following references accordingly to my project.

1570284.jpg

1570283.jpg

I am able to drag and drop the Report Viewer to my form and able to view it as shown below by adding references from '..\packages\Microsoft.ReportViewer.2015.12.0.2.2403\lib\net40'

1570325.jpg

But when i run the project it shows the error 'Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=15.0.0.0' as shown below.

1570328.jpg

Please advise on what could possibly be wrong here?

Thank you.






VB.NET Programmer

Continue reading...
 
Back
Top