I have tried resetting toolbox and i updated 'microsoft.reporting.winforms' packages to v11 but still same error occurs. Failed to create component 'ReportViewer'. The error message follows 'System.Runtime.Interopservices.COMexception'.A reference to the component 'microsoft.reporting.winforms' already exists in the project.
I had a reference to microsoft.reporting.winforms version 10.0.0.0 . I removed it from reference and downloaded report viewer for visual studio 2015.Then,I added a reference to microsoft.reporting.winforms version 12.0.0.0 .I was able to use the report viewer. Hopefully,it works.
I'm currently using VS2017 v15.9.21 and I had to develop some changes in an old project .NET Framework 4.5.2
I was following the instructions in this post:
Integrating Reporting Services Using the Report Viewer Controls - Get Started
But it gives me an error when I was trying to add the Report Viewer Control from the toolbox.
I was executing the nuget command:
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms
And the VS keeps throwing me this error failing to create the component because of some assembly from the last version
Microsoft.ReportingServices.ReportViewerControl.Winforms 150.1404.0
:
So I decided to downgrade the version to the last 140 version number
Install-Package Microsoft.ReportingServices.ReportViewerControl.Winforms -Version 140.1000.523
And voilà!
Works like a charm.
Just remove microsoft.reporting.winforms from the reference. It works for me. Hope it will work for you.
As I am using RDLC report in desktop application. so I just removed Microsoft.ReportingServices.ReportViewerControl.WebForms
nuget package. I have install it by mistake and install the alternative packages. Microsoft.ReportingServices.ReportViewerControl.Winforms
for windows application works for me, but I'm using two more package with it:
Corrected.Microsoft.ReportingServices.ReportViewerControl.Winforms
Microsoft.ReportViewer.WinForms.v12
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With