c# - 命名空间 'Reporting' 中不存在类型或命名空间名称 'Microsoft'

标签 c# reference report reporting

我只是得到以下错误:

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

将此添加到我的代码后:

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

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

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

谁能帮我解决这个问题?

最佳答案

在我的例子中,我需要在有问题的机器上实际安装 Microsoft Report Viewer。

当然还有其他的,可以根据dll上的Version=判断需要哪个。就我而言,我需要版本 11(2012 年版本)。

关于c# - 命名空间 'Reporting' 中不存在类型或命名空间名称 'Microsoft',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26814563/

相关文章:

c++ - C++ 中的引用在内部编译为指针还是别名?

c# - 如何在(rdlc)报告中水平显示表格

user-interface - 如何为我的最终用户提供运行时表单设计器?

C#/C++ 互操作 - 需要帮助定义我的数据结构

c# - 基于 char 的字符串拆分\

Pearl:嵌套数据结构中的交叉引用?

reporting-services - 在 RDLC 报告中右对齐图像

c# - WPF自定义控件中的"The type reference cannot find a public type..."错误

c# - 在不知道泛型类型的情况下将对象添加到集合中

c++ - 仅使用标准库创建 "Vector of References"的标准实践