Asked by:
How to change the name of C# Project

Question
-
Dear friends
my question may sounds little bit different.
yes it is how to change the name of C# project.
i have made a .dll file using VS2005 C#
it contains several class files and windowsforms and referal dll's
now after finishing that project i just want to change the name of the whole project.
any guide lines to follow.
Thnaks and regards
Ranu
Friday, January 12, 2007 3:54 AM
All replies
-
To rename the compiled dll *.dll click project then yourproject properties and change the text in the assembly name textbox, save your project and rebuild. To rename the project file *.csproj , right-click the project name in the solution explorer and select rename.Friday, January 12, 2007 3:57 AM
-
both,
i have to change the name in my source code and the compiled dll also
i mean i have to completely change the name including the source code folder name.
please help me out
thanks and regards
ranu
Friday, January 12, 2007 4:02 AM -
thanks
if i change the both *.dll name and *.csproj name is that enough
is that changes change the name every where(like name spaces and displayname and all)
regards
ranu
Friday, January 12, 2007 4:19 AM -
right click on project > properties > and change the Default namespace to the name of the project you will be changing it to. This should hopefully now be ok.Saturday, January 13, 2007 8:03 PM
-
Change the name and path of a project as well as the name of the solution Unfortunately all information given in Internet is incomplete and rather confusing. After spending some time I figure out the following steps that allow changing all: the name of the project the name of the starting directory as well as that of the solution the name of the solution Here we go... 1. open project "FileName.sln" in Visual Studio 1.1. click on the "Edit" menu. 1.2. move cursor on "Find and Replace" 1.3. select and click on "Replace in Files" 1.4. in the field "Find what:" insert the "FileName" 1.5. in the field "Replace with:" insert "NewName" 1.6. click on "Replace All" 1.7. save the file 1.8. exit Visual Studio. 2. Open the windows explorer. 3. rename the directory of the project to the "NewName" 4. go into the directory "NewName" 5. delete file "NewName.suo" 6. edit "NewName.sln" with a text editor 6.1. replace the "FileName" with the "NewName" 6.2. save the file 6.3. close the editor 7. rename the directory "FileName" to "NewName" 8. get into that directory 9. edit "NewName.csproj" with a text editor 9.1. repeat steps 3.1, 3.2, 3.3 10. edit "MainWindow.g.i.cs" with a text editor 10.1.repeat steps 3.1, 3.2, 3.3 11. edit "MainWindow.g.cs" with a text editor 11.1.repeat steps 3.1, 3.2, 3.3 12. edit "MainWindow.baml" with a text editor 12.1.repeat steps 3.1, 3.2, 3.3 13. delete all files starting with "FileName..." 14. delete file "Properties.Resources.Designer.cs.dll" lacated in .."\obj\x86\Debug\TempPE" 15. delete all files in directory .."\bin\debug" 16. Open project "NewName" 17. rebuild solution 18. DONE!!!
Sunday, May 30, 2010 12:16 AM -
Did you try refactoring option to change the references in the code, after renaming the file names for project and dll.
Select one instance of the namespace or class in your code, right-click, choose Refactor and then Rename, it will change all the instances for the selected one.
Vidya Vrat Agarwal. MCPD,MCTS, MCT, MCSD .NET, MCAD .NET, MCSD. http://dotnetpassion.blogspot,comWednesday, June 2, 2010 6:32 PM -
Did you try refactoring option to change the references in the code, after renaming the file names for project and dll.
Select one instance of the namespace or class in your code, right-click, choose Refactor and then Rename, it will change all the instances for the selected one.
Vidya Vrat Agarwal. MCPD,MCTS, MCT, MCSD .NET, MCAD .NET, MCSD. http://dotnetpassion.blogspot,comit doesn't work for me. i have a very simple project (solution?) for a class. it has a half-dozen webforms and a couple C# files. if i do what you said and press Ctrl-F5 (Run without debug), it gives me countless errors because none of the names of tools/controls i created in the ASP files (.aspx) are recognized (for instance, Label1). When I look at a .aspx file, the first line still has code like this: Inherits="OLDNAME.WebForm0". However, manually making that change doesn't get rid of the errors.
Friday, May 11, 2012 9:35 PM -
Hey ApollonZinos ... your step by step worked for me.
I didn't have the "MainWindow" files.
Thursday, December 6, 2012 8:19 PM