pashov.net/code|January 1, 2015

Daily Archives: January 1, 2015

.NET

Change MVC project name in VS

Published by:

Changing the MVC project name in VS is not a standard procedure as hitting F2 and typing the new name. Here are the steps to change the name:

– Click on the project name, hit F2 and rename the project

Go to project properties (right click the project and select Properties). Then under the Application tab change the Assembly name and the Default Namespace

– Go to any class in the project and select the namespace (that should be the old project’s name). Right-click it and select -> Refactor -> Rename and type in the new name. That should change the namespace for the project.

– Change the project folder’s name

Open the .sln with a text editor and manually change the project’s name

– Finally (that’s tricky) go to views folder, locate the web.config there and edit the namespace in the file