Microsoft ReportViewer 2012 Reference

若如初见. 提交于 2019-12-12 14:07:47

问题


I have Microsoft.ReportViewer.WinForms version 11.0.0.0, publickeytoken 89845dcd8080cc91 in %WINDIR%/Assembly. Actual file version is 11.0.3412.0. I have the 2012 ReportViewer redistributable installed. I go to add a reference to my .NET 4.0 C# project, and the only available selection is 10.0.0.0, file version 10.0.40219.329. So I browse to %PROGRAMFILES% (x86)/Microsoft Visual Studio 12.0/ReportViewer/Microsoft.ReportViewer.WinForms.dll, which shows as an 11.0 version, but when added the csproj file references the 10.0 version:

<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>

When I build and deploy to a 32 bit machine, the usage of the dll prompts from a missing DLL - 10.0.0.0 - why won't it pick up the 2012 version?


回答1:


I can't say I've had that happen. I've been able to install the redistributable from the Microsoft website and version 11.0 of the assembly is installed in the GAC.

I don't have Visual Studio 2013 installed, which is where the "Microsoft Visual Studio 12.0" directory is. But I do have the correct ReportViewer.WinForms assembly in my "Microsoft Visual Studio 11.0" directory as well.

If you're really wanting to see if the correct references exist, you can try editing your project file manually to reference the version 11 of ReportViewer.WinForms by editing it to:

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

That should try loading the assembly from the GAC. But I doubt that will work. I'd honestly try reinstalling the SSRS 2012 Report Viewer Runtime redistributable.



来源:https://stackoverflow.com/questions/23114437/microsoft-reportviewer-2012-reference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!