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 !
One thought on “Changing VSS bounded ASP.NET project directory name.”
Being new to .NET I found your Blog very useful. Anyway, "I have a couple of questions re changing CSs bound ASP.NET project name"
In the context of gettting a slick CI system working with VSSd….
1) Wrt. best practice should all ASP.NET: Web Applications and Web Service projects reside in sub directories off your top level solution directories. If so I guess you need to create all virtual dir mappings prior invoking "the add New Project" wizard. Anything else I should consider
2) If I go for 1) do I need mess around with webmap elements in solution elements in my buildscript ?
Comments are closed.