gpt4 book ai didi

c# - Microsoft ReportViewer 2012 引用

转载 作者:行者123 更新时间:2023-11-30 14:56:20 27 4
gpt4 key购买 nike

我在 %WINDIR%/Assembly 中有 Microsoft.ReportViewer.WinForms 版本 11.0.0.0,publickeytoken 89845dcd8080cc91。实际文件版本为 11.0.3412.0。我安装了 2012 ReportViewer 可再发行组件。我去添加对我的 .NET 4.0 C# 项目的引用,唯一可用的选择是 10.0.0.0,文件版本 10.0.40219.329。所以我浏览到 %PROGRAMFILES% (x86)/Microsoft Visual Studio 12.0/ReportViewer/Microsoft.ReportViewer.WinForms.dll,它显示为 11.0 版本,但添加后 csproj 文件引用 10.0 版本:

<Reference Include="Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio 12.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll</HintPath>
</Reference>

当我构建并部署到 32 位机器时,dll 的使用提示缺少 DLL - 10.0.0.0 - 为什么它不获取 2012 版本?

最佳答案

我不能说我遇到过这种情况。我已经能够安装 redistributable from the Microsoft website程序集的版本 11.0 安装在 GAC 中。

我没有安装 Visual Studio 2013,这是“Microsoft Visual Studio 12.0”目录所在的位置。但我的“Microsoft Visual Studio 11.0”目录中也有正确的 ReportViewer.WinForms 程序集。

如果您真的想查看是否存在正确的引用,您可以尝试手动编辑您的项目文件以引用版本 11 的 ReportViewer.WinForms,方法是将其编辑为:

<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" />

那应该尝试从 GAC 加载程序集。但我怀疑这会奏效。老实说,我会尝试重新安装可再发行的 SSRS 2012 Report Viewer Runtime。

关于c# - Microsoft ReportViewer 2012 引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23114437/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com