To achieve this in something that I'm working on, I created my own solution, added the projects I needed (including projects that I never wanted to compile), and then in Configuration Manager I turned off the checkboxes for building projects, I did not want to build, as described above.
I also made a copy of the existing solution (which had 16 components), saved it under a new name (foo.sln β foo.mine.sln), and then turned off the assembly of all the other subprojects except the ones I am working on in this way I know for sure that I got the correct build settings.
This is not the easiest solution, but it works well for me and takes less than 2 minutes to set up and is easy to understand. Usually I add a new solution to the version ignore list so that it is never checked.
source share