Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
756 views
in Technique[技术] by (71.8m points)

c# - The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft'

I simply get the following error:

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?

question from:https://stackoverflow.com/questions/26814563/the-type-or-namespace-name-reporting-does-not-exist-in-the-namespace-microsof

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In my case I needed to actually install Microsoft Report Viewer on the troublesome machine.

Of course, other ones are available, it can be worked out which from the Version= on the dll which one is needed. In my case I needed version 11 (the 2012 one).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...