How to refresh the winforms designer

Magesh Sankar 36 Reputation points
2021-03-24T13:59:28.817+00:00

In one of my WinForms application, Looks the designer files are not updated. Suppose in design View I delete some controls, it is not reflecting in designer.cs.

Note: If i do any resizing action to the form, it wil updated properly .

Any suggestion?

Developer technologies | Windows Forms
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,661 Reputation points
    2021-03-25T02:24:58.757+00:00

    Hi MageshSankar-9134,
    >> Suppose in design View I delete some controls, it is not reflecting in designer.cs.
    After you delete controls from design View, you need to save the form and it will be reflected in designer.cs.
    And I made a test in VS2019 Windows Forms App(.NET Framework).
    81290-325.gif
    You can also refresh the Form1.Desinger.cs manually by following steps:
    Right click Form1.Designer.cs and choose Refresh menu.
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.