命名空间“Microsoft"中不存在类型或命名空间名称“Reporting" [英] The type or namespace name 'Reporting' does not exist in the namespace '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"/>
谁能帮我解决这个问题?
can anyone help me with this?
推荐答案
我通过右键单击我的项目中的 References 文件夹,然后选择 添加引用 来实现的.然后将 Assemblies > Extensions > 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.
这篇关于命名空间“Microsoft"中不存在类型或命名空间名称“Reporting"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!