简体   繁体   中英

How to clone and rename a project in Visual Studio 2017?

I have a Project & Solution .sln in Visual Studio 2017. How to rename it in Visual Studio 2017 ?

It is written in C#.

Finally managed to figured it out as below;

  1. Rename the project: WindowsFormsApplication2 to NewName
  2. Rename the output folder to NewName: WindowsFormsApplication2 to NewName
  3. Open the Solution (WindowsFormsApplication2.sln) with VisualStudio 2017 and Right click to rename WindowsFormsApplication2 to NewName Make sure to rename both Project name and Solution name
  4. Open Solution's properties from Project-> NewName properties Tool Menu and Rename Assembly Name , ** Default Namespace** also Assembly info with NewName
  5. Open one of the *.cs file and rename the namespace from: namespace WindowsFormsApplication2 to namespace NewName using right click on WindowsFormsApplication2

Now both the Project and Solution should be fully renamed and able to build/rebuild.

I do not have any answer to this. Because I did not understand your question itself. Will you be more specific with your question. Just reframe the question once again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM