The Move Type To Another Project refactoring allows you to quickly move the selected type to any referenced project.
Supported: C#, VB.NET
Beware that the Move Type To Another Project command is enabled only when a project reference is added to the current project.
To move a type to another project
Place the caret over the type and press Alt+Insert. From the pop-up menu, select Move Type To Another Project.
The following dialog will appear containing all available projects:
- Once a project is selected press OK to finish or Cancel to abort the operation.
If you complete the operation the type will be moved to the new project. A using directive will be added in case the moved type is used in the current file.
Once the user decides to move a type that uses another one from the current project, as presented in the Figure below, a confirmation dialog will appear.
The dialog provides an information that in case the type is moved it won't be added a reference to the target project. The reason is
the threat of circular dependancy. As an advice I would add that in this case it would be best to start moving types from the ones that don't depend on others.
To introduce a variable you can also navigate on the main menu. Choose JustCode | Refactor | Move Type To Another Project.