4

Does anyone now how to update reference from MS Chart 3.5 to MS Chart 4. I have recompile ASP.NET project with Visual Studio 2010, the reference already pointing to MS Chart 4.0 dll, but when I open the web app, it still says "The base class includes the field 'Chart1', but its type (System.Web.UI.DataVisualization.Charting.Chart) is not compatible with the type of control (System.Web.UI.DataVisualization.Charting.Chart)."

Do I miss any step for this upgrade?

James
  • 89
  • 4
  • 16

2 Answers2

2

There is an assembly reference to System.Data.Visualization in your web.config file. Make sure it is pointing to the correct version of the dll.

The web.config file looks like this for the 3.5 version:

        <compilation debug="true">
            <assemblies>
                ...
                <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            </assemblies>
        </compilation>
Larry Hipp
  • 6,205
  • 3
  • 26
  • 31
  • 2
    Thanks for pointing the right problem, I've solve the problem, to update the reference, a tag must be changed from into – James Jan 11 '11 at 16:28
2

Also check your references and make sure the System.Web.DataVisualization and System.Web.DataVisualization.Design assemblies are the correct version. For some reason my references maintained the 3.5 version. Removed them and updated them to version 4 and all was good again.