Microsoft ReportViewer 2012参考

时间:2014-04-16 15:57:12

标签: c# .net visual-studio-2013 report-viewer2012

我在%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版本?

1 个答案:

答案 0 :(得分:5)

我不能说我已经发生了这种情况。我已经能够安装redistributable from the Microsoft website,并且在GAC中安装了11.0版的程序集。

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

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

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

应该尝试从GAC加载程序集。但我怀疑这会奏效。我诚实地尝试重新安装SSRS 2012 Report Viewer Runtime可再发行组件。

相关问题