本文介绍了Visual Studio 2010-打开其他分支时自动更新IIS物理路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个解决方案,其中包含许多不同的Web应用程序-该解决方案具有不同的TFS分支.将Web应用程序设置为在本地计算机上使用IIS.

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 solution you get a message saying:

为Web项目AppName指定的本地IIS Url http://localhost/AppName 尚未配置.为了打开该项目,需要配置虚拟目录.您现在要创建虚拟目录吗?是/否.

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:

创建虚拟目录 http://localhost/AppName 失败,并显示以下错误:URL'http://localhost/AppName'已映射到其他文件夹位置.

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.

这显然是正确的,因为它已映射到另一个分支.以前这可以正常工作,Visual Studio会自动为我重新映射该文件夹-但是在重新安装Visual Studio之后,它不再起作用,并且我收到第二条错误消息.我的另一位同事对此没有任何问题,在第一条消息中单击是"后,它会自动为他重新映射该文件夹.我以管理员身份运行Visual Studio 2010,它可以从项目的属性"页面创建虚拟目录(如果尚不存在).

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.

必须在某处进行设置,或者需要更改某些设置才能使它生效.每次我在分支之间切换时,必须手动重新映射所有Web应用程序是一个巨大的痛苦.

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.

推荐答案

我只是遇到了这个 exact 相同的问题.解决方案是下载VS SP1.我们团队的一半使用的是VS 2010的旧版本.

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

这篇关于Visual Studio 2010-打开其他分支时自动更新IIS物理路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 13:23