Improve behavior of "build before run" option

Instead of building the whole solution, we just now build the startup project and any
dependency of that project. Fixes bug 1428.