Proper way to rename solution and project in visual studio

  1. In Solution Explorer, right-click the project, select Rename, and enter a new name.
  2. In Solution Explorer, right-click the project and select Properties. On the Application tab, change the “Assembly name” and “Default namespace”.
  3. In the main cs file (or any other code files), rename the namespace declaration to use the new name. For this right-click the namespace and select Refactor > Rename enter a new name. For example: namespace WindowsFormsApplication1
  4. Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs.
    [assembly: AssemblyTitle("New Name Here")]
    [assembly: AssemblyDescription("")]
    [assembly: AssemblyConfiguration("")]
    [assembly: AssemblyCompany("")]
    [assembly: AssemblyProduct("New Name Here")]
    [assembly: AssemblyCopyright("Copyright ©  2013")]
    [assembly: AssemblyTrademark("")]
    [assembly: AssemblyCulture("")]
  5. Delete bin and obj directories physically.
  6. Rename the project physical folder directory.
  7. Open the SLN file (within notepad or any editor) and change the path to the project.
  8. Clean and Rebuild the project.

Add a Comment

Your email address will not be published. Required fields are marked *