title: Visual Studio 2010 with .NET 4.0 not recognising System.Web.UI.DataVisualization.Charting
body: <p>I am using Visual Studio 2010 with .NET 4.0.</p>
  
  <p>I have just started using the MS charting.  When I complie the project, I get following error:</p>
  
  <pre><code>The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)
  </code></pre>
  
  <p>And also, in my code, this line has a squigly line underneath it indicating that the namespace cannot be found:</p>
  
  <pre><code>using System.Web.UI.DataVisualization.Charting;
  </code></pre>
  
  <p>However, if I go to my localhost to the page that has the chart in it, it renders fine.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Any help with this would be much appreciated.</p>
  
  <p>Thanks.</p>