How Rename Project And Solution Name In ASP.NET MVC

Hello Guys,

In this article will learn how to change ASP.NET MVC solution and all the projects name in visual studio, let’s do it step by step.

First of all, rename your solution and projects name.

  • Project Name

  • Full solution name

  • Then go to the project’s properties.

  • Change Assembly name and Default namespace name with the new project name.

  • Now go to the folder containing your project.

  • Then rename the folder name with your new project name.

  • Now open the .sln file with notepad++

  • And change all project paths with the new ones.

  • Now Change the Assembly information of projects like this.
    • Go to Properties
    • Click on Assembly information…

  • Rename the Title and Product With new name.

  • Now change the namespace name to all the place where you’re using, You must have to change namespace name in the below sections.
    • Controllers
    • Class
    • Global.asax
    • Models
    • BundleConfig
    • FilterConfig
    • RouteConfig
    • etc where your using namespace

  • In the Global.asax change the inherits value like below.

  • Now Clean the full solution.

  • Then the Go to bin folder and delete all the files which are containing bin folder.

  • Now rebuild the full solution.

 

  • That’s it, now your project has been successfully renamed.

 

  • Let me know in the comments section if your facing problems like above will solve it.

 

 

Thanks for reading this blog, I am sure it’s very helpful for you.

4 Comments

  1. Prasad

    This was really helpful. Thanks a lot

    1
    0
    Reply
  2. Sam

    I get “The item ‘Global.asax.cs’ does not exist in the project directory. It may of been removed, renamed or deleted.

    0
    0
    Reply
    1. I just want to confirm that, Is your project in .NET MVC?

      1
      0
      Reply
  3. Umair

    This was really helpful. Thanks a lot

    1
    0
    Reply

Submit a Comment

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

Subscribe

Select Categories