应用程序需要安装Microsoft.ReportViewer。WinForms 11.0.0.0首先安装在全局程序集缓存(GAC)中

时间:2022-06-09 12:46:53

I have a ClickOnce WPF application. It was installing correctly until I changed ReportViewer from Version 10 to Version 11.

我有一个ClickOnce WPF应用程序。它正确安装,直到我将ReportViewer从版本10更改为版本11。

I know get the following error when trying to install:

我知道安装时出现以下错误:

The application requires that assembly Microsoft.ReportViewer.WinForms Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) First.

应用程序需要安装Microsoft.ReportViewer。WinForms 11.0.0.0首先安装在全局程序集缓存(GAC)中。

How do I fix this and still have it using ClickOnce, I can't do a manual install as the users don't have permissions; they only have permissions to use ClickOnce.

如何修复这个问题,并且仍然使用ClickOnce,我不能进行手动安装,因为用户没有权限;他们只有使用ClickOnce的权限。

I tried changing the Microsoft.ReportViewer.WinForms.dll Publish status from Prerequisite to Include, but still the error persists.

我试着改变microsoft.reportview . winforms。dll发布状态从先决条件到包含,但错误仍然存在。

应用程序需要安装Microsoft.ReportViewer。WinForms 11.0.0.0首先安装在全局程序集缓存(GAC)中

3 个解决方案

#1


3  

I was able to get this to work on a machine with the same problem although I needed to download two .msi applications.

虽然我需要下载两个.msi应用程序,但我仍然能够在有相同问题的机器上运行这个程序。

First I downloaded and installed SQLSysClrTypes. It is located here as it is needed to install report viewer.

首先,我下载并安装了SQLSysClrTypes。它位于这里,因为需要安装报表查看器。

Just click download, it'll take you onto a page with a scroll bar. SQLSysClrTypes is near the bottom. Just tick that and hit next, and you can download and install that.

只要点击下载,它就会带你进入一个有滚动条的页面。SQLSysClrTypes位于底部附近。只要点击它,点击next,你就可以下载并安装它。

I got report viewer from here.

我从这里收到报告。

After installing the both of them. I was able to grab from my ClickOnce with reportviewer 11 and it downloaded and ran successfully where previously I was having the exact same problem.

安装完后。我可以从我的ClickOnce中获取reportviewer 11,它下载并成功运行,之前我也遇到了同样的问题。

As an addendum, I was logged onto admin so this solution may not be the best if you don't have admin.

作为补充,我登录了admin,所以如果没有admin,这个解决方案可能不是最好的。

#2


1  

Add it as a prerequisite to the installer.

将其作为安装程序的先决条件。

  1. Right click your project and go to Properties.
  2. 右键单击项目并进入属性。
  3. Click the Publish tab.
  4. 单击Publish选项卡。
  5. Click Prerequisites....
  6. 单击先决条件....
  7. Find Microsoft Visual Studio 2010 Report Viewer and check it. (There may be a different version available since the update, check for that.)
  8. 找到Microsoft Visual Studio 2010报告查看器并检查它。(更新后可能会有不同的版本,请检查。)

Upon installation of your application it will now download report viewer for the user.

安装应用程序后,它将为用户下载报告查看器。

#3


1  

If you go to the NuGet package manager, you can install the Microsoft.Winforms.ReportViewer 11 version from there. This will get all the dependent DLL files, and everything will be there.

如果你去NuGet软件包管理器,你可以安装Microsoft.Winforms。来自那里的ReportViewer 11版本。这将获得所有相关的DLL文件,并且所有内容都在那里。

#1


3  

I was able to get this to work on a machine with the same problem although I needed to download two .msi applications.

虽然我需要下载两个.msi应用程序,但我仍然能够在有相同问题的机器上运行这个程序。

First I downloaded and installed SQLSysClrTypes. It is located here as it is needed to install report viewer.

首先,我下载并安装了SQLSysClrTypes。它位于这里,因为需要安装报表查看器。

Just click download, it'll take you onto a page with a scroll bar. SQLSysClrTypes is near the bottom. Just tick that and hit next, and you can download and install that.

只要点击下载,它就会带你进入一个有滚动条的页面。SQLSysClrTypes位于底部附近。只要点击它,点击next,你就可以下载并安装它。

I got report viewer from here.

我从这里收到报告。

After installing the both of them. I was able to grab from my ClickOnce with reportviewer 11 and it downloaded and ran successfully where previously I was having the exact same problem.

安装完后。我可以从我的ClickOnce中获取reportviewer 11,它下载并成功运行,之前我也遇到了同样的问题。

As an addendum, I was logged onto admin so this solution may not be the best if you don't have admin.

作为补充,我登录了admin,所以如果没有admin,这个解决方案可能不是最好的。

#2


1  

Add it as a prerequisite to the installer.

将其作为安装程序的先决条件。

  1. Right click your project and go to Properties.
  2. 右键单击项目并进入属性。
  3. Click the Publish tab.
  4. 单击Publish选项卡。
  5. Click Prerequisites....
  6. 单击先决条件....
  7. Find Microsoft Visual Studio 2010 Report Viewer and check it. (There may be a different version available since the update, check for that.)
  8. 找到Microsoft Visual Studio 2010报告查看器并检查它。(更新后可能会有不同的版本,请检查。)

Upon installation of your application it will now download report viewer for the user.

安装应用程序后,它将为用户下载报告查看器。

#3


1  

If you go to the NuGet package manager, you can install the Microsoft.Winforms.ReportViewer 11 version from there. This will get all the dependent DLL files, and everything will be there.

如果你去NuGet软件包管理器,你可以安装Microsoft.Winforms。来自那里的ReportViewer 11版本。这将获得所有相关的DLL文件,并且所有内容都在那里。