Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-30-2024, 05:17 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Make VS 2022 VERSIONINFO is not incremented

Hi;
I'm using one single "Make VS2022" step to rebuild a solution.
I have set "Increment the target version if...", but it's never incremented.
The .rc file of the included projects (in the solution) contain either only one VERSIONINFO or several ones for each language we support.
The .rc files are checked out from the repositories before the rebuild step starts.

Here is the content of one such .rc file:
Code:
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 2024,01,10,823
 PRODUCTVERSION 6,8,3,0
 FILEFLAGSMASK 0x1fL
#ifdef _DEBUG
 FILEFLAGS 0x9L
#else
 FILEFLAGS 0x8L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904e4"
        BEGIN
            VALUE "Comments", "....."
            VALUE "CompanyName", "....."
#ifdef XR_DBMS_ODBC
            VALUE "FileDescription", "....."
#else
				VALUE "FileDescription", "....."
#endif
            VALUE "FileVersion", "2024.01.10.823"
            VALUE "InternalName", "....."
            VALUE "LegalCopyright", "....."
            VALUE "LegalTrademarks", "....."
            VALUE "OriginalFilename", "....."
            VALUE "PrivateBuild", "4/30/2024"
            VALUE "ProductName", "....."
            VALUE "ProductVersion", "6.8.3"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1252
    END
END


LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
  FILEVERSION 2024,01,10,823
  PRODUCTVERSION 6,8,3,0
  FILEFLAGSMASK 0x1fL
#ifdef _DEBUG
  FILEFLAGS 0x9L
#else
  FILEFLAGS 0x8L
#endif
  FILEOS 0x4L
  FILETYPE 0x2L
  FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040704e4"
        BEGIN
            VALUE "Comments", "....."
            VALUE "CompanyName", "....."
#ifdef XR_DBMS_ODBC
            VALUE "FileDescription", "...."
#else
            VALUE "FileDescription", "....."
#endif
            VALUE "FileVersion", "2024.01.10.823"
            VALUE "InternalName", "....."
            VALUE "LegalCopyright", "....."
            VALUE "LegalTrademarks", "....."
            VALUE "OriginalFilename", "....."
            VALUE "PrivateBuild", "10.01.2024"
            VALUE "ProductName", " ....."
            VALUE "ProductVersion", "6.8.3"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x407, 1252
    END
END
What can be the reason for this error and how can I solve it?

Thanks in advance

Martin
Reply With Quote
  #2  
Old 05-01-2024, 03:00 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
We did find an issue with the default target filename for x64 configuration not including the \x64 path in the filename, which would prevent the action from detecting a difference to increment the version. This is fixed in the latest download (VisBuildDotNET.dll 10.9.0.2).

If that doesn't resolve the issue, please provide the information requested at

https://www.kinook.com/Forum/showthread.php?t=3044

Thanks.
Reply With Quote
  #3  
Old 05-02-2024, 01:50 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Hello;
I just updated VBP to the latest release but the problem still exists.
We will provide the information as requested by the end of the day.
Reply With Quote
  #4  
Old 05-02-2024, 04:33 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Hi;

We found out, that the increment is only done, when we choose 'All' in 'Which solution or project config should be build or updated? ...'.
But in our case we are always generating only the Release|x64 configuration. As soon as we explicitely set this configuration, the increment stops working.
Why?

TIA

Martin
Reply With Quote
  #5  
Old 05-02-2024, 07:11 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
That was happening in our tests (attached) as well before the fix (when building all configurations, it correctly identified the x86 executable target filenames but not the x64). Please post the project files.
Attached Files
File Type: zip Project1.zip (30.9 KB, 324 views)
Reply With Quote
  #6  
Old 05-08-2024, 05:13 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Hello;

Which files do you need in detail?
Only the .vcxproj files or the .sln?
In addition, do you need the VBP build file too?

TIA

Martin
Reply With Quote
  #7  
Old 05-08-2024, 07:06 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
The .bld file, the .vxcproj file, the .sln (if that is what you're building), and the .rc files in the project.
Reply With Quote
  #8  
Old 05-13-2024, 03:58 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Find enclosed the requested files.
Currently we build only the Release|x64 configurations.
Attached Files
File Type: zip SampleProject.zip (83.8 KB, 164 views)
Reply With Quote
  #9  
Old 05-13-2024, 02:21 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
Your projects are referencing

$(DefaultPlatformToolset)

which the Make VS action doesn't know about.
Code:
<OutDir>..\..\bin\$(DefaultPlatformToolset)\$(Configuration)\</OutDir>
The value would vary depending on the version of Visual Studio that is performing the build. It looks like the default for VS 2022 is v143.

What you can do is add a Set Macro step before the Make VS action to set DefaultPlatformToolset = v143 with 'Add to environment variables...' checked, and the Make VS action will do the replacement on the VS variable from the environment variable. If the executable is created in that path, the action will be able to detect the change for incrementing.
Reply With Quote
  #10  
Old 05-14-2024, 07:11 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
I will try to change the build script but will you support $(DefaultPlatformToolset) in a future release?
All our libraries are using this macro, because they are built with/for different compiler versions.

TIA

Martin
Reply With Quote
  #11  
Old 05-14-2024, 08:06 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
Supported in the latest download (VisBuildDotNET.dll 10.9.0.3).
Reply With Quote
  #12  
Old 05-29-2024, 07:59 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Hi;

Sorry for the delayed reply.
I tried both - new DLL and the macro workaround - but both of them do not work! What I found out so far is: When compiling any of the 32-bit configuration ithe version number is increased, but as soon as we create a 64-bit configuration, the increment is not performed.
As I mentioned before, we exclusively build only 64-bit configurations.
Attached Images
   
Attached Files
File Type: zip Project1.zip (241.9 KB, 65 views)

Last edited by mgampi; 05-29-2024 at 08:16 AM.
Reply With Quote
  #13  
Old 05-29-2024, 09:56 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
Try the latest download (VisBuildDotNET.dll 10.9.0.4).
Reply With Quote
  #14  
Old 05-31-2024, 04:03 AM
mgampi mgampi is online now
Registered User
 
Join Date: 05-19-2011
Posts: 9
Hello;

I tested with the release 10.9.0.4 but its still the same. 64-bit configurations are not incrementing the last number of the file version as shown in my previous post.
Reply With Quote
  #15  
Old 05-31-2024, 10:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
It worked in the test harness I created (attached).

Please provide a buildable project (and all source code files) that demonstrates the issue.

Thanks.
Attached Files
File Type: zip TestSLN.zip (476.8 KB, 67 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 08:10 AM.


Copyright 1999-2023 Kinook Software, Inc.