Changing VSS bounded ASP.NET project directory name.
Damn, such a long title… I must take a minute to relax; Done –
I had to change the directory name of my Web project in order to ease my build process.
Well, I must admit, this isn’t an easy task when you don’t remember the steps or you’re too
tired to messing around with it (rule of thumb: gather the required powers, it won’t get easier to adjust it later you know).
So, from my experience here are the steps for changing the VSS bounded ASP.NET project
directory name without killing your VSS\Solution:
- Close the solution if it’s open (i.e – close the Visual Studio .NET).
- Create the new directory name you want to address the ASP.NET project into.
- Go to the IIS (Ctrl + Q -> iis, oh wait, assuming you’ve followed my advice and installed SlickRun) and change the virtual directory path to point to the new directory.
- Open the *.sln file with notepad (right-click->open with…) and find “SccLocalPath[number]” which points to your current(unwanted) directory name; overwrite the directory name with the new directory name.
- Delete the *.suo file – NOTICE: this is a hidden file so you must check the option to view all the hidden files (OS configuration). This file keeps the user configuration about the solution (like what is my StartUp project\file etc.)
- Open the *.sln via VS.NET and you’ll get a window which will ask you to choose the web project path (http://localhost/VirtualDirectoryName_1) – remove the “_1” suffix and click OK.
- Delete the old web project directory. TIP: if you’re trying to delete the old web project directory and you’ll get an error that there are files in use – try to delete VSWebCach directory (in your c:\Documents and Settings\[username]) and then try to delete the directory again.
- Drink something and relax, you deserve it !