Copying winforms between projects in Visual Studio

c#, visual-studio, winforms

Solution

- Copy the three files, `.cs`, `.designer`, `resx` to the target solution folder.

- In the target project, select `Add existing item` and add the designer file first.

- Modify the Namespace attribute. The `.cs` file should come in as well.

- Modify the namespace in the `.cs` file.

- Add the `resx` file using `Add existing item`.

Problem

What is the best way to copy or cut/paste a form from one project to another project within a Solution in Visual Studio? Whenever I try it, using the solution explorer (drag and drop or right clicking cut and paste), it only copies the underlying C# code and not the necessary 'bits and pieces' that help you visualise the form via the form designer.

Original source