Occasionally Visual Studio (2005, 2008, 2010) will lose its mind, and get confused by a WinForm:
SplashForm.cs:
public partial class SplashForm : Form
{
...
SplashForm.Designer.cs:
partial class SplashForm
{
...
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
...
It will complain:
protected override void Dispose(bool disposing)
base.Dispose(disposing);
It's complaining about code that it generated.
It's been too long (3 years) since i dealt with Visual Studio, so i've forgotten the trick to get Visual Studio's head out of its own assembly.
What's the trick to get it going again?
I had this issue today and found this question. I managed to fix it and while the post is old (2 years old now) I think it is always good to answer it with the solution I found:
<Form>.Designer.cs
namespace so that it matched the rest of the forms Namespace. But I didn't change the <Form>.cs
namespace and that was my mistake.So, if you're having this error, make sure both your namespaces from the <Form>.Designer.cs
and <Form>.cs
match.