Muhammad Adeel Zahid
Muhammad Adeel Zahid

Reputation: 17784

Problems deploying a WinForms app that uses Microsoft ReportViewer

I have published a WinForms application from Visual Studio 2010. It uses .NET 4.0. in the prerequisite dialog in Publish pane I selected .NET 4.0 Client Profile and Windows Installer 3.0. After publishing application to disk, I migrated it to client's computer which first installed .NET Client Profile and after reboot it gave following error message:

Unable to Install or run application. The application requires that assembly, Microsoft.ReportViewer.Common version 10.0.0 in global assembly cache first.

After this message the installation process exits. I'm using .NET's report in my project (not Crystal Reports).

Upvotes: 8

Views: 24366

Answers (6)

Ali Hamza
Ali Hamza

Reputation: 65

  1. Open project properties Alt+Enter.

  2. Click on publish tab.

  3. Click on prerequisites select Microsoft visual studio report viewer.

visit this website for more detail https://msdn.microsoft.com/en-us/library/ms251723.aspx

Upvotes: 0

Buzzzzzzz
Buzzzzzzz

Reputation: 1204

I had the same problem for months, one machine cat v.11 installed (manually by adding some components) and another had v.10 (from the ms framework itself), when I did the publish from my machine, it gave the error.
here is how I fixed it,
In Nuget, there are 2 packages,
Microsoft.ReportViewer.Windows (Microsoft.ReportViewer runtime 2012) and
ReportViewer.Common 10.0
I installed them both, now its working quite all right

Upvotes: 0

RAVI VAGHELA
RAVI VAGHELA

Reputation: 897

Download and install Microsoft Report Viewer 2012 Runtime CTP from following url...

http://www.microsoft.com/en-in/download/details.aspx?id=27230

I had same problem but it solved after install the above...

Thanks...

Upvotes: 0

Ted
Ted

Reputation: 2585

I guess this is probably a new VS2012 feature, but you now can deploy Report Viewer (and the SQL Server CLR Types) with Forms / WPF click once installations.

  1. Open the project properties page.
  2. Click the Publish tab, and then click the Prerequisites button.
  3. Select Microsoft Visual Studio 2012 Report Viewer, and SQL Server CLR Types then click OK.
  4. Make sure that the Download prerequisites from the component vendor’s website option is checked. This is the only supported option. Then, click OK.
  5. Click the Options button.
  6. In the Deployment tab, specify a deployment Web page and select the Automatically generate deployment web page after ever publish checkbox.
  7. Click OK and publish the application.

Upvotes: 1

Cody Gray
Cody Gray

Reputation: 244782

You have to deploy the ReportViewer controls separately.

Check here on MSDN for more information: Deploying Reports and ReportViewer Controls

The ReportViewer control redistributable is a self-extracting file named ReportViewer.exe that includes an .msi and other files. You can find ReportViewer.exe at the following location:

%PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.exe

You can also download it from the Microsoft Download Center.

[ . . . ]

The type of control you are using determines where ReportViewer.exe should be run.

  • For ASP.NET applications, run ReportViewer.exe on the Web server that hosts your application. This must be done by a server administrator.

  • For Windows Forms applications, include the controls as an application prerequisite so that they are installed automatically with your application. You can use the bootstrapping application to automate this step:

    • Open the project properties page.

    • Click Publish, and then click Prerequisites.

    • Select Microsoft Visual Studio 2010 Report Viewer, and then click OK.

    • Publish the application.

During application installation, a check is performed on the local computer to see if ReportViewer is already installed. If it is not installed, the Setup program will install it.

Upvotes: 12

AEMLoviji
AEMLoviji

Reputation: 3257

look at this: Running ReportViewer.exe

both we are gave you same link. it will help you

Upvotes: 0

Related Questions