How to fix broken winform designer?

In VS.NET 2008 (.NET 3.5), someone renamed a button in the designer auto gen'd code.  Everything builds and works fine except the designer.  When you open the designer in, if gives an error:

The type 'System.Windows.Forms.UserControl' has no property named 'TheNewButtonName'.

If I name the button back to the old name, it still gives the error.  Is there a way to fix this?
Who is Participating?
Anurag ThakurTechnical ManagerCommented:
create a new form and then copy the controls from the designer and past them to the new form - i hope that the form is still opening in the designer mode


does your user control "System.Windows.Forms.UserControl" has the property 'TheNewButtonName'
if not then remove or comment the line in which 'TheNewButtonName' is there
search for 'TheNewButtonName' and comment the line
Have you tried doing a Clean on the solution?  I normally find that works.
brettrAuthor Commented:
I had delete the button in question.  The designer came back.  Then I added a new button and set the property.  I don't see how the above solutions apply.  Unless someone says otherwise, I'm going to close the question.
From what I can see that was ragi0017's suggestion about removing the button.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.