我在 %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 版本?
我不能说我经历过这种事。我已经能够安装可从 Microsoft 网站重新分发 http://www.microsoft.com/en-us/download/details.aspx?id=35747并且该程序集的版本 11.0 安装在 GAC 中。
我没有安装 Visual Studio 2013,这是“Microsoft Visual Studio 12.0”目录所在的位置。但我的“Microsoft Visual Studio 11.0”目录中也有正确的 ReportViewer.WinForms 程序集。
如果您确实想查看是否存在正确的引用,您可以尝试手动编辑项目文件以引用版本 11ReportViewer.WinForms
将其编辑为:
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" />
那应该尝试从 GAC 加载程序集。但我怀疑这是否有效。老实说,我会尝试重新安装 SSRS 2012 Report Viewer Runtime 可再发行组件。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)