Why can't I see Microsoft.ReportViewer.WebForms version 10.0.0.0 in “Add Reference…” dialog?

家住魔仙堡 提交于 2019-12-19 19:48:25

问题


I have a VS2008 Reporting Services project (database: SQL Server 2008 RC2). This project has been updated from VS2005/SQL2005.

I need to update the Report Viewer control to version 10.0.0.0. But when I install the Redistributable (http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=a941c6b2-64dd-4d03-9ca7-4017a0d164fd), it isn't added to the .NET-tab in the 'Add reference...' dialog!

I can see the Microsoft.ReportViewer 8.0.0.0 and Microsoft.ReportViewer 9.0.0.0 in the dialog, but no 10.0.0.0

I tried running uninstalls for everything ReportViewer related, and reinstalling the ReportViewer 10.0.0.0 control. But I still see both version 8 and 9 in the dialog, but no version 10!

Checking the GAC through Start->Run->Assembly I can see all three versions. I cannot remove 8 and 9 because they apparently are used by other programs...

This is driving me somewhat nuts...

What do I have to do to make this assembly available in the "Add Reference..." dialog in Visual Studio 2008??

Regards Alex


回答1:


OK, found a solution: Apparently VS2008 combined with ReportViewer2010 requires a little handy-work:

http://blogs.msdn.com/b/changliw/archive/2010/06/29/use-the-reportviewer-2010-control-in-visual-studio-2008-project.aspx

After I extracted the assembly DLLs from the GAC, I could add them to the 'Add reference...' dialog as described here:

http://www.csharp411.com/adding-assemblies-to-the-visual-studio-add-reference-dialog/

I hope this'll help another distressed soul! ;)

/Alex




回答2:


Another possible cause of assemblies not showing in Add reference is the implicit target framework filtering. E.g.: Visual Studio 2010, .NET Fwk 4.0 target will filter assemblies targeting this particular fwk. To add Microsoft.ReportViewer.WebForms 10.0.0.0, I changed project's target fwk to 3.5, added the references and then switched back to 4.0.



来源:https://stackoverflow.com/questions/4396146/why-cant-i-see-microsoft-reportviewer-webforms-version-10-0-0-0-in-add-referen

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