Visual Studio 2010, how can I start only one web project in a solution when debugging?

4

1

In Visual Studio 2005, choosing to debug a specific web project only starts an ASP.NET Development Server for the project selected.

In Visual Studio 2010, debugging starts an ASP.NET Development Server for all 6 of the web projects in this solution, regardless of which one I chose to debug.

Is there a way to change this behavior to only open the Development Server for the web site project that I intend to debug? It's a drain on resources, and annoying to have to close each of them every time I start this.

Brisbe42

Posted 2011-12-15T20:58:15.927

Reputation: 293

Same as https://stackoverflow.com/q/8609350/10245

– Tim Abell – 2017-09-13T10:47:57.190

Answers

4

Finally found the answer to my question. Apparently each csproj.user file has a setting:

 <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>

Changing this from the default of true to false, allows you to make it so it won't do this setting.

Brisbe42

Posted 2011-12-15T20:58:15.927

Reputation: 293

1

You should be able to see each project in the solution in the "Solution Explorer." Find the project that you want to debug, right-click on it, and select "debug" from the menu that pops-up. Give it a shot once (that works for me).

Aaron

Posted 2011-12-15T20:58:15.927

Reputation: 752

This builds only this project, and debugs into it successfully, but it still opens up 6 ASP.NET Development Server instances. – Brisbe42 – 2011-12-15T21:49:49.863

Ok, in Solution Explorer right-click on the solution, and click on "Properties." On the Solution property pages expand "Common Properties" and click on "Startup Project." You should have the option to specify a default or even choose "current selection." – Aaron – 2011-12-15T21:57:39.223

By default, it was current selection. Changing it to a specific Startup Project still successfully runs that project, debugs into it, but still is opening up ASP.NET Development Server instances for all 6 web projects in the solution. – Brisbe42 – 2011-12-15T22:04:51.597

In the same properties window, the next item down (underneath Startup Project) should be "Project Dependencies." Once you get in there, select the project (that you're trying to debug) from the drop-down list, and see what it's dependent on. It could be that it's just running the rest of those out of necessity. – Aaron – 2011-12-15T22:08:28.750

I'm trying to run the 'WebServices' app. It depends on Business, Data, and Library. It builds only these projects, but then opens up 6 development server instances, including for the main one which has no dependency on this, or vice versa. – Brisbe42 – 2011-12-15T22:19:15.687