What are the requirements for running a C# program on a client’s machine?

Asked

Viewed 552 times

1

I’m testing my app done on c# on the customer machine, it works normally, my problem is only in printing the reports, when printing this generate this error:

Ocorreu uma exceção sem tratamento no aplicativo. Se você clicar em
continuar, o aplicativo ignorá esse erro e tentara continuar. S e Clicar
em Encerrar, o aplicativo será incerrado imediatamente.

Não foi possivel carregar arquivo ou assembly
"Microsoft.ReportViewer.WinForms, Version=11.0.0.0 Culture=neutral.
PublicKey Token=89845dcd8080cc91" ou uma de suas dependências.
O sistema não pode encontrar o arquivo especificado.

Before I have run my application, I installed in the client machine the following software:

  • Sql_server 2008 R2;
  • Reportviewer 2008;
  • NET.Framework_3.5_Windows_8. 1;
  • Visualbasicpowerpackssetup;

But he still won’t issue the report.

  • Check the platform of the reportviewer 64/32 bit. I do not use it, but in Crystal Reports it has this difference. You can in your project, put the reference to copy to the output directory as well, and send the dll to the application

  • As for bits. I’ve checked is 32.

  • 1

    you installed this: https://www.microsoft.com/en-us/download/details.aspx?id=6576 ??

  • Yes I installed, in the description of the issue in question, it contains all the programs I installed for the client’s machine

  • yes, I just asked to see if it’s the same described

  • Make sure that Reportviewer’s DLL(s) is(not) in the client’s PATH or in Gac.

Show 1 more comment

2 answers

1

try to do this:

In the "Copy Local" option mark as true, and Compile the project

inserir a descrição da imagem aqui

  • Okay, I’ll test, thanks for your help.

  • I just tested and it didn’t work

0

Like you said you installed the Microsoft Report Viewer Redistributable 2008 then you just need to copy to the Bin from your application the following DLL:

• Microsoft.ReportViewer.Common.dll
• Microsoft.ReportViewer.DataVisualization.dll
• Microsoft.ReportViewer.ProcessingObjectModel.dll
• Microsoft.ReportViewer.WebForms.dll
• Microsoft.SqlServer.Types.dll

Path of the GAC

Microsoft.ReportViewer.Common.dll

C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\11.0.0.0__89845dcd8080cc91

Microsoft.ReportViewer.Datavisualization.dll

C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.DataVisualization\11.0.0.0__89845dcd8080cc91

Microsoft.ReportViewer.Processingobjectmodel.dll

C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\11.0.0.0__89845dcd8080cc91

Microsoft.ReportViewer.Webforms.dll <- if the application is Web

C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91

Microsoft.ReportViewer.Winforms.dll <- if the application is WINDOWS FORM

C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\11.0.0.0__89845dcd8080cc91

Microsoft.SqlServer.Types.dll

C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Types\11.0.0.0__89845dcd8080cc91
  • Even doing so does not work, I installed Reportview version 11.0.0.0 that it is asking in the error message and does not work.

  • And found the files I mentioned above?

  • Note that in the error message presented in the question there is a token '89845dcd8080cc91', note that there must be a folder with the same name. Also found?

  • I would also do Uninstall and install Microsoft Report Viewer Redistributable 2008

  • 1

    I already managed to solve my problem, I installed Sqlsysclrtypes2012_x64 accompanied by Reportviewer, but before uninstalled the reportview I had installed.

  • @Antóniomateta legal that solved, I will vote positive in your question!

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.