CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Moving a vs.net web project to another location

According to the .text statistics this is my 100th post. Opinions, big blogs and statistics. To celebrate, something trivial.

If you've ever moved a web project to a different machine or even to a different virtual dir of your local webserver you will have noticed vs.net will not open your project because it cannot find the project on the webserver. What works with me is a little patch in the solution-file using notepad.

Steps:  (Where neccesary)

  1. Select the solution file (.csproj)
  2. Send it to notepad with the right mouse button
  3. Update the virtual dir in the second line
  4. Save the file
  5. Create the virtual directory in IIS admin
  6. Map the physical directory with the solution to the virtual dir
  7. Check "Script source access" in the virtual dirs properties

The first part of the solution file will look similar to this :

Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "loginSystem", "http://localhost/warnar/loginSysteem/loginSystem.csproj", "{30B12A58-89AE-4E65-A5B3-B4A16F5DD236}"

If you update the url to the new location vs.net will open the project and you can continue to work on it.

Blog on, a 100 still won't do... Peter



Check out Devlicio.us!