VS 2012 launching app based on wrong path

前端 未结 7 1281
予麋鹿
予麋鹿 2020-12-25 13:33

I have a app which is under source control (TFS 2012 also) on c:\\Dev\\MyApp\\Main.

Because im developing a new feature I decided to open a branch on c:\\Dev\\MyApp\

7条回答
  •  长发绾君心
    2020-12-25 13:51

    Restarting VS seems to fix this problem. This is just an alternative solution, just as its a norm with all Windows products - close and restart, and boom it'll work!

    Here's what happened: I faced the same problem after I worked on a web project in a branch using VS2013. As Chris Gillum mentioned above, I had the applicationhost.config open while I restarted VS, and the file got auto-refreshed with the correct path. So, this definitely seems to be a bug in Visual Studio.

    UPDATE:

    I've seen this issue numerous times since I posted this answer. And I've found an alternative to restarting VS. Here's what I do now:

    1. Right click IISExpress Icon and click on "Show all Applications"
    2. Select the Site Name from the list
    3. Click (and open) the Config file
    4. Search for and fix the physical path to your workspace under the following section:

      
          
              
          
      
      

    IISExpress will automatically refresh the site, and you do not need to restart VS. Hope this helps someone.

提交回复
热议问题