Today I need to rename one of my Project Solution.It is actually complex to do correctly because the project name is used in several places.
Here are steps you need to follow to rename a solution:
Step 1:
In Solution Explorer, right-click the project, select Rename, and enter a new name.
Step 2:
In Solution Explorer, right-click the project and select Properties. On the Application tab, change the"Assembly name" and "Default namespace".
Step 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:
Step 4:
Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs.
Step 5:
Delete bin and obj directories physically.
Step 6:
Rename the project physical folder directory.
Step 7:
Open the SLN file(within notepad or any editor) and change the path to the project.
Step 8:
Cleans and Rebuild the project
Here it is now your project is completely renamed.
If you found any other place which I missed do comment here.
Here are steps you need to follow to rename a solution:
Step 1:
In Solution Explorer, right-click the project, select Rename, and enter a new name.
Step 2:
In Solution Explorer, right-click the project and select Properties. On the Application tab, change the"Assembly name" and "Default namespace".
Step 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:
1 | namespace WindowsFormsApplication1 |
Step 4:
Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs.
1 | [assembly: AssemblyTitle( "New Name Here" )] |
2 | [assembly: AssemblyDescription( "" )] |
3 | [assembly: AssemblyConfiguration( "" )] |
4 | [assembly: AssemblyCompany( "" )] |
5 | [assembly: AssemblyProduct( "New Name Here" )] |
6 | [assembly: AssemblyCopyright( "Copyright © 2013" )] |
7 | [assembly: AssemblyTrademark( "" )] |
8 | [assembly: AssemblyCulture( "" )] |
Step 5:
Delete bin and obj directories physically.
Step 6:
Rename the project physical folder directory.
Step 7:
Open the SLN file(within notepad or any editor) and change the path to the project.
Step 8:
Cleans and Rebuild the project
Here it is now your project is completely renamed.
If you found any other place which I missed do comment here.
Комментариев нет:
Отправить комментарий