I am using using VS2010 and if I have a form open in designer mode and run my application the designer tab will no longer show the form designer but instead an error will be di
Close the form. Clean the solution. Rebuild the solution. Reopen the form. Worked for me when nothing else would.
I'm able to avoid restarting VS by doing the following
In my case, I have a winforms project with several custom controls that are used by other custom controls. Whenever I open some of those custom controls, I get a the "The base class ..." error. Adding a new custom control, building the project and then adding some custom controls from my project to the new custom control allowed me to open the custom controls that were giving me the "The base class ..." error.
UPDATE: I think I found the problem. My controls were not 'added' properly to the csproj file. In the csproj file, the files for partial classes of UI controls/components need the 'DependentUpon' attribute.
E.x.: before:
<Compile Include="Windows\Forms\DataGridView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Windows\Forms\DataGridView.Designer.cs" />
after:
<Compile Include="Windows\Forms\DataGridView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Windows\Forms\DataGridView.Designer.cs">
<DependentUpon>DataGridView.cs</DependentUpon>
</Compile>
I usually close the visual form, rebuild the solution, right-click then select "view designer" in the form code.
Very, very annoying. I am thinking of dropping back to VS2008.
I had a situation where a custom user control appeared to be creating the error (not sure why) so I removed references to the user control from the form and the error went away.
Old post, but for those whom may find this...
Just ran in to this error and for me it was relatively simple fix.
Found that it may have something to do with the names of your classes, and renaming the problematic class to a higher order. That is the alphabetical order it appears in the assembly (Where A is higher than Z).
MSDN Article
Good luck.