29

I have a solution with a few different projects in it: a couple dll projects, a console project, and a couple WCF projects.

The console project uses a dll from one of the projects, but I have VS set so that the console project has no dependencies. However, when I debug the console project VS launches, or builds all my projects. This is just a pain since both the WCF projects compile and launch the WCF client or the asp.net dev IIS process. Is there a way to prevent this behavior?

EDIT: I have semi fixed it. To prevent the WCF library from launching, I followed this: How to Prevent Visual Studio launch WcfSvcHost.exe in Debuggin?

But I still cant stop the asp.net dev server from launching.

Community
  • 1
  • 1
Mike_G
  • 16,237
  • 14
  • 70
  • 101
  • I had a similar question that was resolved. The same solution may work for you: [link](http://stackoverflow.com/questions/575381/visual-studio-2008-build-dependency-chain) – Jason Irwin Apr 09 '09 at 14:55

4 Answers4

39

Right click on your solution, then go to Properties, Configuration Properties and select the projects you want to be compiled.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • 1
    Thanks Darin, you always seem to have the best answers. – C. Ross May 21 '12 at 13:09
  • 3
    I'm having this same issue. It's not as simply as Properties -> Configuration properties. My solution is set to only build one project but it builds and deploys all of them. The only way to fix this issue is to manually alter the sln file. – rbrundritt Jan 31 '13 at 18:12
25

You might try checking what Visual Studio builds when running a project. Open the Options dialog, and go to Projects and Solutions | Build and Run. Try turning on "Only build startup projects and dependencies on Run".

Andy
  • 30,088
  • 6
  • 78
  • 89
16

To stop the ASP.Net dev server from launching:

Simply click the web project in the solution explorer and hit F4 to bring up the properties window, and change "Always start when debugging" from "True" to "False". You might need to check all the projects in the solution.

See this thread for more on this.

Community
  • 1
  • 1
womp
  • 115,835
  • 26
  • 236
  • 269
-3

Just Unload The Project, Right Click Project -> Unload Project

NickLeach
  • 101
  • 1
  • 4