4

I have a huge solution with many web projects and many console projects.

When I set a console project as the default startup project, and then click on "Start debugging" (F5) here is what happens:

  1. There are 7 local web servers that are started (as there are 7 web projects)
  2. The console application is then launched

I'd like to know if there is a way to tell VS2010 not to start the 7 web projects and to run only the console application?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
  • Project -> properties -> startup objects? – Anton Feb 06 '12 at 07:23
  • This sounds odd and unexpected. In any case, have you considered just creating an empty solution and adding only the console application(s) you care about? – selbie Feb 06 '12 at 07:32
  • possible duplicate of [Why does Visual studio 2010 start ASP.net development server when debugging unit tests](http://stackoverflow.com/questions/6345269/why-does-visual-studio-2010-start-asp-net-development-server-when-debugging-unit) – Kevin Panko Mar 19 '14 at 16:24

3 Answers3

2
  1. You can make a web project to "Use Local IIS Web Server" instead of the VS web server

  2. Every web project has a project property "Always Start When Debugging". Set to False, the VS web server will not start the project's web server.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
devio
  • 36,858
  • 7
  • 80
  • 143
  • Devio, I found the property "Always start when debugging". Thanks a lot for this piece of info. That's great. – user1191755 Feb 06 '12 at 08:05
  • @user1191755: all the 3 web site projects (not web app) has such option turned off, and anyway a web server starts for each of them every time. – abatishchev Feb 06 '12 at 08:10
1

From my experience (in our main solution we have ~10 dlls and 3 web sites) this is not possible,

unless you unload (menu Project -> Unload) this web site projects from the solution.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
0

In Visual Studio 2010 (and also VS2012) there's an option to only build and start the Startup project(s) with their dependencies. So if your Console Project is your only startup project, VS will only compile and start your console project with the necessary referenced projects.

See: Tools -> Options -> Projects and Solutions -> Build and Run -> Check "Only build startup projects and dependencies on Run".