title: Visual Studio 2010 - Automatically update IIS Physical Path when opening a different branch
body: <p>We have a solution which has a number of different web applications in it - the solution has different TFS branches. The web applications are setup to use IIS on the local machine.</p>
  
  <p>When opening a different branch of the solution you get a message saying:</p>
  
  <p>The local IIS Url <a href="http://localhost/AppName" rel="nofollow">http://localhost/AppName</a> specified for Web project AppName has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now? Yes / No.</p>
  
  <p>If you click Yes I then get a second error message that says:</p>
  
  <p>Creation of the virtual directory <a href="http://localhost/AppName" rel="nofollow">http://localhost/AppName</a> failed with the error: The URL 'http://localhost/AppName' is already mapped to a different folder location.</p>
  
  <p>Which is obviously correct because it is mapped to the other branch. Previously this worked fine and Visual Studio would automatically remap the folder for me - but after reinstalling Visual Studio this no longer works and I get the second error message. Another of my colleagues here has no problem with this and it remaps the folder automatically for him after hitting yes on the first message. I am running Visual Studio 2010 as an administrator and it can create virtual directories (if one doesn't already exist) from the Properties page of the projects.</p>
  
  <p>There must be a setting somewhere or something I need to change in order to get this to work. It is a huge pain to have to manually remap all the web apps every time I switch between branches.</p>