Alex Rivera | Logout

Copying winforms between projects in Visual Studio

Asked 2009-05-14T14:16:27.547
45

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.

Edit
Report

1 Answer

4

Use ReSharper (get the demo), right-click the class in Code View, Refactor->Move, and move it to another project.

The added benefit is that if you change the namespace by moving it between projects, it'll auto-update all references.

answered 2009-05-14T14:33:26.943

Your Answer