Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-11-2007, 11:45 AM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
Need to change VSNET_PROJ_VER number format

I am able to retrieve the file version of a .vdproj file I am working with, but for some reason it is set to 1.1, instead of 1.0.0.1. I am trying to do a 'Run Script' step to add the two middle digits, but I am unable to do so. Also, I tried using the commands shown below to set the macro to a variable:

Set m = vbld_TempMacros()("VSNET_PROJ_VER")
Set m = vbld_TempMacros("VSNET_PROJ_VER")
Set m = vbld_TempMacroObj()("VSNET_PROJ_VER")

All of them fail. How can I change the version number format that is being retrieved from the 'VS.NET Get Version' step? Is is not possible?

Last edited by ambalboa; 07-11-2007 at 11:57 AM.
Reply With Quote
  #2  
Old 07-11-2007, 12:31 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
For setup projects, the VS.NET Get Version action retrieves the project's ProductVersion value. This is typically a three-segment version (i.e., 1.0.2), but the action simply retrieves the value as-is from the .vdproj file.
http://www.visualbuild.com/Manual/vs_netprojver.htm

To change the value of the macro set by the action, you can use code like (VBScript)
Code:
Set m = vbld_TempMacro("VSNET_PROJ_VER")
' given a macro value like 1.1, convert to 1.0.0.1
m.Value = Left(m.Value, 1) + ".0.0" + Mid(m.Value, 2)
http://www.visualbuild.com/Manual/systemscripts.htm
http://www.visualbuild.com/Manual/objectmodel.htm
Reply With Quote
  #3  
Old 07-11-2007, 02:17 PM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
Yes, thank you. That works great.

Now, your comment made me think about the value as it is set in the .vdproj file. So, How do I increment that number? If it's a file version number, then all I need to do is place the filename of the .vdproj file, and check the "Update the File version" to increment it (using a 'Make VS.NET' step), right? Right now, I am building a .sln file and I only have "Update the File version" checked. Would this update the version number on the .vdproj also? I did this once, but it seems it only updates the version number of the .dll files that are created. Would a seperate 'Make VS.NET' step be needed to just increment that number, but not build it? Thank you for your help.
Reply With Quote
  #4  
Old 07-11-2007, 03:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Right, use a separate no-build Make VS.NET step to update the product version of the .vdproj file.
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 02:00 PM.


Copyright © 1999-2023 Kinook Software, Inc.