When using DevPartner with Visual Studio, the entire project rebuilds after a single source file is changed and recompiled.
This most common reason an entire project would change when using DevPartner is when instrumentation is turned on or turned off. This information is stored in the %projectname%.vcxproj.user file, by solution configuration. Turning instrumentation on or off results in a change to this file under the $(Platform) element for that respective solution configuration, i.e. Debug | Win32. The change results in the project being labeled as dirty as a result and rebuilt when compile on a single file is selected.
The recommended approach to avoid rebuilding the entire project when switching from instrumentation and non-instrumentation is to maintain separate configurations, one with instrumentation turned on, and the other with instrumentation turned off. Under Configuration Manager, define a new Solution Configuration type, in addition to the default Debug and Release configurations. This will enable the maintenance of a Solution Configuration with instrumentation turned on, and a Solution Configuration in which instrumentation is turned off.