views:

170

answers:

3

Why running debug doesn't build all selected project in the active configuration?

Normally I've got some DLLs which are connected to the main project indirectly (MEF) and when I run in debug (F5) VS.NET doesn't build those DLLs. I have to Build (Ctrl+Shift+B) first, then debug the application to debug the current versions of those DLLs.

I assume VS.NET is trying to speed up the debug process by not building non-referenced DLLs however in my case it makes it even slower.

Is there anyway to change this behaviour?

+1  A: 

Maybe check your project dependencies: Project | Project dependencies.

sean e
:) Good catch that's what I was looking for.
dr. evil
+2  A: 

Can I assume that these DLL's are simply referenced and not currently part of your solution? If so, then that's why. For you to achieve the functionality I think you are looking for, then you will have to add the project(s) for the DLL(s) that are being referenced to your solution and instead of referencing the DLL directly, you would reference the project. This will allow you to compile the DLL along with your main project and debug seamlessly. If this isn't what you're talking about then I apologize.

Alexander Kahoun
This is correct, just reference the DLLs even if you are using IOC specifically for physical separation of concerns. It will save you from pulling out your hair while trying to debug.
cfeduke
No they are part of my solution but they are not referenced because they supposed to be loaded in runtime (just like load a plugin -they are actually plugins-)
dr. evil
A: 

The following setting also might affect which projects in your solution are built when starting a debug session:

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

0xA3