.rc file messed up after applying win32 version info updater

Hi everybody,

We are facing a problem when we try to modify the version of vc++ 2005 project executables. Our main project consists of large number of vc++ 2005 projects. We use 'win 32 version info updater', to change the fileversion/productversion of executables. It has worked fine for all, but two the projects. In case of these two projects, the .rc file is corrupted after the execution of above mentioned action.

For example: Before applying the action,

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "SITABpmSendObj Module\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "SITABpmSendObj\0"
            VALUE "LegalCopyright", "Copyright 2007\0"
            VALUE "OriginalFilename", "SITABpmSendObj.DLL\0"
            VALUE "ProductName", "SITABpmSendObj Module\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
            VALUE "OLESelfRegister", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

And after applying the action:

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,2
PRODUCTVERSION 1,0,0,2
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x01L
#else
FILEFLAGS 0x00L
#endif
 FILEOS 0x4L
FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "CompanyName", "\0"
            VALUE "FileVersion", "10.0.2\0"
            VALUE "FileDescription", "SITABpmSendObj Module\0"
            VALUE "InternalName", "SITABpmSendObj\0"
            VALUE "LegalCopyright", "Copyright 2007\0"
            VALUE "OriginalFilename", "SITABpmSendObj.DLL\0"
            VALUE "ProductName", "SITABpmSendObj Module\0"
    PRODUCTVERSION 1,0,0,2
            VALUE "OLESelfRegister", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

The version numbers in the output .rc file are expected but as you can see, the format is broken. As a result, following MSBuild action throws these error:

ERROR RC2133 in .\SITABpmSendMgmtObj.rc(80,0) : unexpected value in value data
ERROR RC2132 in .\SITABpmSendMgmtObj.rc(80,0) : expected VALUE, BLOCK, or END keyword

This is happening to only two vc++ 2005 projects, in entire build.

Is this some bug or could something be wrong with the projects itself?

Thanking in advance.

Hi

I am able to reproduce it here, I’ll post here when we have a build with the fix.

Here’s the build with the fix :

https://www.finalbuilder.com/downloads/finalbuilder/620/FB620_1359.exe

Hi Vincent,

That seem to solve the problem. I appreciate your quick response.

Thanks again.

Regards,

Sankalp Shere.