类型或名称空间名称"Reporting"在名称空间"Microsoft"中不存在 [英] The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft'

查看:47
本文介绍了类型或名称空间名称"Reporting"在名称空间"Microsoft"中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是得到以下错误:

名称空间"Microsoft"中不存在类型或名称空间名称"Reporting"(您是否缺少程序集引用?)

The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

将其添加到我的代码后:

after adding this to my code:

protected global::Microsoft.Reporting.WebForms.ReportViewer ReportViewer1;

我已经看到一些解决方案,说我必须添加一些程序集.但他们都没有工作.这是一个例子:

I've seen some solutions saying I must add some assemblies. but none of them worked. here is an example:

<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

有人可以帮我吗?

推荐答案

我是通过右键单击项目中的 References 文件夹,然后选择 Add Reference 来实现的.然后将程序集>扩展> Microsoft.ReportViewer 添加到引用中.

I did it by right-clicking on References folder in my project and then selecting Add Reference. and then adding Assemblies > Extensions > Microsoft.ReportViewer to the references.

这篇关于类型或名称空间名称"Reporting"在名称空间"Microsoft"中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆