How to solve this problem of report viewer, not encotrado in a Windows Form application?

0

I have a problem. I just compiled a windows form c # project, and from the project's debug folder I copied and pasted the content into a client's machine, but the problem is that when I open the reports it tells me this error.

It is possible that the components were not loaded ?, in my machine if it is displayed, but in the client no longer. Any way to solve it? Here I send you captures of those added in the references.

Thanks

It seems to indicate another error when indicating copy local = true en Microsoft.ReportViewer.Common

I abjunto the image.

    
asked by JuanL 16.05.2018 в 23:00
source

3 answers

0

you must make sure that the libraries are included in the output of your executable. You can include the libraries from NuGet or mark the libraries and in the selected properties Local Copy = True (you must do it one by one).

    
answered by 16.05.2018 в 23:07
0

This happened to me recently, first check that the .Net Framework of the machine is updated and that in the Debug folder are the dll of the report viewer, I was solved with the issue of the dll.

    
answered by 13.08.2018 в 15:00
-1

To solve this problem you can install Microsoft Report Viewer 2012 Runtime and change your references to point to those installed by the execution time.

  

Before installing, try uninstalling previous versions of the report viewer.

You can check these dlls:

  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.WinForms.dll
  • Microsoft.ReportViewer.DataVisualization.dll

You find them C:\Windows\assembly\GAC_MSIL\... and then you put them in the references of your project.

For each of them, say: local copy and check if there is a 32 or 64 bit solution.

You can also run it with this command in PM Console and Nuget :

Install-Package Microsoft.ReportViewer.2012.Runtime

Install-Package Microsoft.ReportViewer.2015.Runtime -Version 12.0.2.2402

Note: If you want to completely remove the%% previous% references, you can remove them from the Manage NuGet Packages package. Installed packages and then delete the related lines from the Microsoft.ReportViewer.xxx file in your project. After that, it will not return again during the construction of the project.

    
answered by 16.05.2018 в 23:15