I am using Visual Studio 2010 with .NET 4.0.
I have just started using the MS charting. When I complie the project, I get following error:
The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)
And also, in my code, this line has a squigly line underneath it indicating that the namespace cannot be found:
using System.Web.UI.DataVisualization.Charting;
However, if I go to my localhost to the page that has the chart in it, it renders fine.
The other strange thing is that when I compile (CTRL + SHIFT + B), I will get 3 compilation errors the first time I compile, then when I do it again, straight after, I get 16.
Even though I get the compilation errors above, I can still run the application and everything works fine, but it is really annoying that it won’t compile so I must be doing something wrong.
Any help with this would be much appreciated.
Thanks.
Unfortunately, none of this worked. I ended up creating a brand new solution and added all the code and it worked properly. There must have been a gremlin somewhere that I couldn’t find.