开发者

Visual Studio 2010 - Automatically update IIS Physical Path when opening a different branch

开发者 https://www.devze.com 2023-03-18 20:09 出处:网络
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.

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.

When opening a different branch of the solut开发者_开发技巧ion you get a message saying:

The local IIS Url http://localhost/AppName 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.

If you click Yes I then get a second error message that says:

Creation of the virtual directory http://localhost/AppName failed with the error: The URL 'http://localhost/AppName' is already mapped to a different folder location.

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.

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.


I just had this exact same problem. The solution was the download VS SP1. Half of our team was using an older version of VS 2010.

http://www.microsoft.com/download/en/details.aspx?id=23691

0

精彩评论

暂无评论...
验证码 换一张
取 消