Since the solution outlined by pilotcam didn't work for me, I took a different approach:
- Make a SVN commit for the file.
- Open the “*.designer.cs” file of the form that shows the error in source view.
- Remove larger blocks of form element declarations.
- Fix all compilation errors with ReSharper (i.e. ensure that nothing is red anymore on the side-indicator).
- Save the file. No need to compile.
- Open the Windows Forms Designer of the form.
- If the error still shows up, do a SVN revert to go back to the initial state.
- Repeat steps 2 to 7 until the error does not show up anymore.
- Now you’ve encircled the erroneous child control that causes the error.
- Repeat steps 2 to 7 with a smaller amount of controls you remove, until you have only one control left.
In my case it was a user control inside a group control inside a tab control, so I first identified the tab control, then the group control and then the user control.
You could isolate the user control inside a new form to further investigate. In my case it was rather easy; I put checks for design mode around most of the functions inside my control to ensure the code only gets executed if the control is not in design mode.
This fixed my error.