Search code examples
visual-studiobuildprojects-and-solutionscommand

How do you only build a file's project using Visual Studio's Command Window?


Ctrl-Shift-B, by default, builds an entire solution. An entire solution may contain many projects. Compiling all at the same time may be very slow, especially when development is only occurring on a single project.

I have tried t remap Ctrl-Shift-B to Build.BuildOnlyProject, but it does not work. Nothing happens.

From the menu, the following option does exactly what I want:

Build -> Build [MY PROJECT NAME]

Solution

  • The command is Build.BuildSelection

    To bind that to a key, click Tools | Customize | Keyboard... then search for it to bind it.

    Note: Build.BuildOnlyProject does not work all the way through VS2010, at least.