What is the correct way to change the namespace of a WinForm's Form?

You may edit the designer file. Stay clear of the region labeled "Windows Form Designer generated code" and you will be fine.


As of VS 2017, you can highlight the namespace you want to rename, right click over it, click Rename, then change it to the new namespace name, then click on Apply in the dialog that should have appeared when you clicked Rename.

1) Highlight the namespace you want to rename and right click, then click Rename:step 1

Type the new namespace name, make sure Preview Changes is ticked and click Apply:

2) step 2

Check all the places you want it changed:

3)enter image description here