Entire Visual Studio project rebuilds after single source file is changed

Entire Visual Studio project rebuilds after single source file is changed

Problem:

When using DevPartner with Visual Studio, the entire project rebuilds after a single source file is changed and recompiled.

Resolution:

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.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2016-05-13 13:56
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.