Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keeping web application attached to IIS Express in Visual Studio 2013

In Visual Studio 2012, if I stopped debugging, the web application would remain attached to IIS Express, such that I could continue loading pages in the browser without having to restart debugging. This worked really well for me in conjunction with .NET Demon, as my application would rebuild after every change and I could just jump over to the browser to check the changes instantly.

After upgrading to Visual Studio 2013, this behavior no longer exists. When you stop debugging, the application is completely detached, such that the browser will generate a error saying that it cannot find the server. I'm finding it very annonying to constantly have to start and stop debugging all the time. Does anyone know if this is just the way it is with 2013, or if I'm missing something somewhere?

EDIT

Okay, so this is pretty weird. Apparently, it's only an issue for whatever is set as the startup project (or is the startup project by virtue of being the one that debugging was started on). Whatever project I start debugging on, or that is set as the startup project, is completely unattached from IIS Express after debugging stops. Any other projects are still available. And, if I set all the projects as startup projects, then after stopping debugging, nothing is available and the IIS Express tray icon goes away completely. Perhaps this is a bug in Visual Studio 2013 and/or IIS Express 8?

like image 426
Chris Pratt Avatar asked Dec 27 '13 22:12

Chris Pratt


1 Answers

Finally stumbled upon the answer. If you have "Enable Edit and Continue" enabled in your project properties, when you stop debugging, Visual Studio will kill the IIS Express process, but if you disable it, IIS Express will continue running.

Turns out, in VS2012, the default for this setting was off, which is why I sort of took for granted that this should just work, but in VS2013, the default was changed to on.

like image 94
Chris Pratt Avatar answered Oct 14 '22 01:10

Chris Pratt