如何为Visual Studio 2015中开发的项目部署Report Viewer Runtime [英] How to deploy Report Viewer Runtime for projects developed in Visual Studio 2015

查看:65
本文介绍了如何为Visual Studio 2015中开发的项目部署Report Viewer Runtime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我自己运行包含reportviewer组件的表单,没问题,当我从菜单选项中调用表单时,它抱怨没有创建Microsoft.Reportviewer的版本14.0.0.0,Common。定位程序集的清单定义确实
与程序集引用不匹配

If I run the form containing the reportviewer component by itself, no problem, When I call the form from a menu option, it complains about not founding the version 14.0.0.0 of Microsoft.Reportviewer,Common. The ,located assembly's manifest definition does not match the assembly reference

推荐答案

Hi Marco,

Hi Marco,

一般来说,Visual Studio 2015使用Reportviewer 12.0.0.0,VS 2017使用版本14.0.0.0,当然它也不是绝对的,如果你想使用Reportviewer 14.0,请参考以下步骤将它添加到你的VS中的工具箱:

In general, Visual Studio 2015 use the Reportviewer 12.0.0.0, and VS 2017 use the version 14.0.0.0, of course it is not absolute either, if you want to use Reportviewer 14.0, please refer to the following steps to add it to your toolbox in the VS:

步骤1, $ b $中运行以下命令b软件包管理器控制台:

安装包Microsoft.ReportingServices.ReportViewerControl.Winforms - 版本140.340.80

Install-Package Microsoft.ReportingServices.ReportViewerControl.Winforms -Version 140.340.80

步骤2,删除工具箱中列出的ReportViewer控件。这是版本为12.x的控件。

Step 2, Remove the ReportViewer Control that is listed in the toolbox. This is the the control with a version of 12.x.

步骤3,右键单击工具箱中的任意位置,然后选择选择项目....

Step 3, Right click in anywhere in the toolbox and then select Choose Items....

步骤4,在.NET Framework组件上,选择"浏览" 。

Step 4, On the .NET Framework Components, select Browse.

步骤5,从您安装的NuGet包中选择Microsoft.ReportViewer.WinForms.dll。

Step 5, Select the Microsoft.ReportViewer.WinForms.dll from the NuGet package you installed.

NuGet包将安装在sol中项目的目录。 dll的路径类似于以下内容: 

The NuGet package will be installed in the solution directory of your project. The path to the dll will be similar to the following: 

{Solution Directory} \packages\Microsoft.ReportingServices.ReportViewerControl.Winforms。{version} \lib \ net40

步骤6,新控件应显示在工具箱。

{Solution Directory}\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.{version}\lib\net40
Step 6, The new control should display within the toolbox.

希望这会有所帮助!

最好的问候,

Stanly


这篇关于如何为Visual Studio 2015中开发的项目部署Report Viewer Runtime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆