Issue with Update version information in project .RC files for build visual studio option

 Hi,

I have a C++ 2008 visual studio .sln, that has two .rc files say A.rc and A.rc. A.rc is used for build configuration A and excluded for configuration B, and the opposite applies to B.rc.

I am using the Win32 Version tab under build vs solution to update my version information, because I would like to set a "Comments" key, which does not seem to be defined by the Win32 Version Info property set, and as I can tell, the only way to add custom keys is via the build vs solution method.

I build Configuration A, however B.rc is modified instead of A.rc. Looking at the vcproj file, it appears that B.rc appears before A.rc under the file list, however the FileConfiguration of B.rc has a file attribute ExcludedFromBuild set to true which is not being taken into account by the FinalBuilder action.

I am currently having to resort to text find/replace actions to add the Comments key to my version info.

Is there an easier way ?

 

-Dave

Hi Dave

The project parser is not smart enough to understand what defines are set etc, so has no way to choose a particular .rc file, it just finds the first .rc file with a version info block. The work around it to turn off the version info section in the VS action, and use the Win32 Version Info Updater action and tell it which file to update.