Compartilhar via


Tutorial: Running Applications Created Using Chart Controls for .NET Framework 3.5 (Chart Controls))

If you created an application using Chart Controls for .NET Framework 3.5, follow this tutorial to run your application against .NET Framework 4.

Note

If your application is deployed on a machine that has .NET Framework 4 installed, but does not have Chart Controls for .NET Framework 3.5 installed, the application will throw a FileNotFoundException.

Running Applications Created Using Chart Controls for .NET Framework 3.5

To run applications created using Chart Controls for .NET Framework 3.5, you must change the application configuration files.

To run applications created with Chart Controls for ASP.NET

  1. Open the Web.config file for your application.

  2. Add the bolded code section below to the configuration/runtime/assemblyBinding element. If either the <runtime> or <assemblyBinding> parent element does not present, create it.

    <configuration>
       ...
       <runtime>
          ...
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
             ...
             <dependentAssembly>
                <assemblyIdentity name="System.Web.DataVisualization" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="3.5.0.0-3.5.0.0" newVersion="4.0.0.0"/>
             </dependentAssembly>
             ...
          </assemblyBinding>
          ...
       </runtime>
       ...
    </configuration>
    
  3. Save the file, and then redeploy your application.

To run applications created with Chart Controls for Windows Forms

  1. Open the App.config file for your application.

  2. Add the bolded code section below to the configuration/runtime/assemblyBinding element. If either the <runtime> or <assemblyBinding> parent element does not present, create it.

    <configuration>
       ...
       <runtime>
          ...
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
             ...
             <dependentAssembly>
                <assemblyIdentity name="System.Windows.Forms.DataVisualization" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="3.5.0.0-3.5.0.0" newVersion="4.0.0.0"/>
             </dependentAssembly>
             ...
          </assemblyBinding>
          ...
       </runtime>
       ...
    </configuration>
    
  3. Save the file, and then redeploy your application.

See Also

Other Resources

<bindingRedirect> Element
Configuration File Schema
Redirecting Assembly Versions