SA1100 on call to Dispose?

May 22, 2012 at 7:45 AM


I'm trying to understand why I am getting an SA1100 on a call to base.Dispose in my generated code.

The Form class metadata suggests that the Dispose method isn't virtual, so I suppose technically the immediate class being inherited doesn't declare it virtual, but how else can I ensure I am calling the base method rather than the override method recursively?

Happy to be convinced otherwise, but looks like a false trigger to me.

Using Stylecop with VS2008 SP1. Default settings (not set to analyse generated files, but does anyway). (System also has VS2010 and ES2010 installed.)

Project is .Net 3.5 C#. 

Code snippit that generates the SA1100:

	/// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
            if (disposing && (this.components != null))


May 22, 2012 at 7:49 AM

Please post the error message text.

May 22, 2012 at 1:01 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 24, 2012 at 2:07 PM

Could you please have a look at the link provided above. I've added some extra info indicating that the issue could still happen in 4.7.25.