Asp.net-mvc – IISExpress does not start from Visual Studio 2015

asp.netasp.net-mvciis-expressvisual-studio-2015

There are several questions here why IISExpress does not launch. The answers I found did not help. But I found the answer myself. This post may help others resolve the issue.

Behavior: You open a web project you copied from somebody else in Visual Studio 2015. You cannot select Browsers and when you start using F5 you get a message that says

Unable to launch the IIS Express Web server.

There is no indication why. Deleting applicationHost.config does not help, restarting / reinstalling etc. does not help either. Admin mode doesn't matter and a new project an the target machine works as expected.

Best Answer

Resolution: First I found that opening the very same project in VS 2012 works, it starts IISExpress just fine. So what's different? It's the .vs folder in the projects root and here especially the file .suo where all the user settings specific for Visual Studio 2015 reside.

Delete the folder .vs if you copy a project from another user/machine. Then open the project. It will create a new settings store on the fly. The project will run just as before and IISExpress works as expected.

If you can't see this folder - it's hidden. So make hidden files visible before this step.

Elder projects and elder VS versions does not have the .vs folder and hence no need to delete it.