Wednesday, June 15, 2011

Renaming a Visual Studio Project

I had a project I wanted to rename from ProjectA to ProjectB. I wasn’t quite sure how to do this. I mean, I wanted the namespaces to change, the default namespaced (used for new files), project file names, filenames, etc. In my case, I had multiple projects in my solution. I wasn’t sure how this would work.

In the end, I used a search and replace tool to change every reference in every fiel from ProjectA to ProjectB. Then I renamed all the files. To find the files that need to be renamed, you might want to check here. Then I opened the solution up in Visual Studio 2010 (VS2010) and it just worked! So cool! Thanks to most files being text or XML this worked seamlessly.

1 comment:

Norman said...

You may want to check out http://normankosmal.com/wordpress/?p=54. Its a tool that does all the dirty work involved in renaming a project. Also supports svn for now.