Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you configure VS2008 to only open one webserver in a solution with multiple projects?

Starting with 2005, VS started this behavior of when starting debugging session it spawns up a webserver for every project in a solution. I have a solution with 15 projects so it takes a while and is a waste of resources. Is there a way to configure it differently besides just using IIS?

like image 905
Kevin Goff Avatar asked Aug 19 '08 15:08

Kevin Goff


2 Answers

Some details here on why it does it and how you can overcome it:

http://vishaljoshi.blogspot.com/2007/12/tips-tricks-start-up-options-and.html

There are instances when you might have many web applications or web sites in the same solution and you may be actually debugging only one of them... In such scenario it might not be desirable to have multiple instances of ASP.NET Development Server running... VS provides an explicit setting in the property grid of web application/site called Development Web Server - "Always Start When Debugging" which is set to True by default... If you set this Property to be False only one web server instance will be created for the start up web project...

like image 90
Martin Avatar answered Oct 19 '22 05:10

Martin


Set the web service project's "Always Start When Debugging" property to false. To get to the property, click on the project node and then hit F4 or click View | Properties Window (not Property Pages).

Be careful: this is not in the properties you reach by clicking the project node then clicking Properties; or by double-clicking the project's Properties sub-node; or by clicking View | Property Pages.

Also annoying is that this is property only persists as a user setting, in the .csproj.user file.

like image 38
Steve Betten Avatar answered Oct 19 '22 04:10

Steve Betten