deployment - 部署使用 Microsoft ReportViewer 的 WinForms 应用程序时出现问题

标签 deployment .net-4.0 installation clickonce reportviewer

我已经从 Visual Studio 2010 发布了一个 WinForms 应用程序。它使用 .NET 4.0。在“发布” Pane 的先决条件对话框中,我选择了 .NET 4.0 Client Profile 和 Windows Installer 3.0。将应用程序发布到磁盘后,我将其迁移到首先安装了 .NET Client Profile 的客户端计算机,并在重新启动后给出了以下错误消息:

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



在此消息之后,安装过程退出。我在我的项目中使用 .NET 的报告(不是 Crystal Reports)。

最佳答案

您必须单独部署 ReportViewer 控件。

在 MSDN 上查看更多信息: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.

关于deployment - 部署使用 Microsoft ReportViewer 的 WinForms 应用程序时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5230858/

相关文章:

ruby - 使用自定义域部署到 Heroku

grails - 在tomcat 6.0.28上部署应用程序时出现问题

java - 将 .jar 部署到 html 页面中

c# - Windows 10 支持的操作系统 GUID 是什么?

apache - 双服务器部署 : PHP and Java

c# - Winforms ReportViewer 并为 ServerReport 正确设置参数

c# - 为什么 CenterToScreen 方法会在光标所在的屏幕而不是具有焦点的应用程序的屏幕上使表单居中?

c# - 使用 C# .net 以编程方式安装/卸载 .inf 驱动程序

python - 运行setup.py后我可以扔掉源代码吗?

installation - 有没有办法直接安装 msm 而无需创建其他安装程序?