Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:39:27+00:00 2026-05-24T15:39:27+00:00

I am using DataVisualization.Charting.Chart extensively, and for the most part it is working. However,

  • 0

I am using DataVisualization.Charting.Chart extensively, and for the most part it is working. However, I’ve been running Code Analysis frequently, and have all my own warnings taken care of. But, there are about 30 CA2000 (object not disposed along all exception paths) in the *.Designer.cs files that use the charting. The Designer files are generating pretty much all the charting code, and almost all the charting elements implement IDisposable. I have “Suppress results from generated code” checked in the project preferences, but it still does it.

Is there any way to fix this, without having to manually create the chart objects, and without disabling Code Analysis for the rest of the code in that class? Is there a way to disable it for all .Designer.cs files? Or, is there a solution to remove these warnings correctly by making the designer code take care of disposal?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:39:28+00:00Added an answer on May 24, 2026 at 3:39 pm

    A fair few developers appear to have encountered this without a luck, so +1 for a good question!

    A possible solution is to write a method that override’s CA2000 and suppresses the rule if the warning is detected in a designer file, here’s a good start:

    Writing Custom Code Analysis Rules in Visual Studio 2010

    Otherwise see the comments at the end of this thread, MSFT engineers mention to log a Connect call: http://blogs.msdn.com/b/codeanalysis/archive/2010/03/22/what-s-new-in-code-analysis-for-visual-studio-2010.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using DataVisualization.Charting.Chart to produce few charts. Everything works very well, until
I'm attempting to user System.Windows.Forms.DataVisualization.Charting to create a line chart. I've been using the
I'm using the' System.Windows.Forms.DataVisualization.Charting ' library for my chart and I was wondering if
I am using a Microsoft Chart control (system.windows.forms.datavisualization.charting.chart) in a Windows forms application, vb.net
I have been using the ASP.NET chart controls for a while on win2k3 (32bit)
I'm currently using the charting within .NET using System.Windows.Forms.DataVisualization.Charting.Chart . Thus far it seems
Using Microsoft's charting control, System.Windows.Forms.DataVisualization.Charting.Chart, I am trying to render a chart to vector
I am using the namespace System.Windows.Forms.DataVisualization.Charting to create a Chart object on a form.
I have a strange situation using asp ajax chart controls. I have an application
http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.chart.click.aspx The event handler: protected void Chart1_Click(object sender, ImageMapEventArgs e) { //stuff } I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.