如何在 Visual Studio 2008 中进行开发并嵌入 .Net 2 的报表查看器对象?
应用程序正在 VS 2008
中开发。 使用报表查看器并从 SQL Server 2005
服务器上的 SSRS 调用报表。
Error:
Server Error in '/AppName' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 41: <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0
我的猜测是,这是因为 .Net 3.5
与 .Net 2.0
的问题。 应用程序服务器没有 3.5
,也不会。
如何修复 VS 2008
以便它使用适合 .Net 2
应用程序的报表查看器?
Application is being developed in VS 2008
. Report viewer is used and calls a report from SSRS on a SQL Server 2005
server.
Error:
Server Error in '/AppName' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 41: <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0
My guess is that it's because of the .Net 3.5
vs .Net 2.0
thing. The Application Server doesn't have 3.5
and will not.
How do you fix VS 2008
so that it will use a Report Viewer appropriate for .Net 2
applications?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您为项目中的 ReportViewer 引用设置 Copy Local = True,则在发布时所需版本的 dll 将被复制到您的 bin 文件夹中。
请参阅http://dotnetslackers.com/_NET/re-100203_Error_Could_not_load_file_or_ assembly_Microsoft_ReportView er_WebForms_Version_9_0_0_0.aspx 了解更多细节。
If you set Copy Local = True for the ReportViewer reference in your project then the required version of the dll will be copied to your bin folder when you publish.
See http://dotnetslackers.com/_NET/re-100203_Error_Could_not_load_file_or_assembly_Microsoft_ReportViewer_WebForms_Version_9_0_0_0.aspx for more details.
我们通过将 2005 报表查看器和 2008 报表查看器都放在服务器上解决了这个问题。 感谢您的回复。
We solved this issue by putting both the 2005 Report Viewer and 2008 report viewer on the server. Thanks for the response.