Change Project Name in Visual Studio

Hello Guys, In this post, I am going to describe how we can rename any project under visual studio solution. I often needed to rename the project name and each time I have to google it to find the correct solution and further often have to do some brainstorming to find out the correct solution, so I decided to create the post and whenever I would need to change the project name I can easily find it and rename it easily.

So let’s not exert this topic, let’s jump to the solution and this solution works in every version of Visual Studio, personally, I tested this on visual studio 2015 and 2017 developer edition and it works.

Steps to change the project name in visual studio

  • In Solution Explorer, right-click on the solution name and rename it
  • In Solution Explorer, right-click on the project name which you want to rename it
  • Next step is, go to the project properties(the project which you want to rename) and change assembly name and default namespace. This will use the updated name whenever you will create any class or any folder under that project
  • Close the visual studio, rename the project folder name
  • The last and important step is to edit the .sln file. Change the old path to a new path
  • Restart your visual studio and you’re done

Congratulations!, you have successfully renamed your project. Hope this information will help you. if you have any questions then feel free to ask in the comment section.

 

Leave a Reply