Question About Auto Increment

This is just a question of curiosity.

I want to auto increment my Major and Minor Versions, but it doesn’t seem to happen. These are my settings:

However it doesn’t seem to do so when in code I say:

tosOpeningSequentialPlaylistMovies.WriteLine openingCurrentDateTime.Now.SQLDateTime + " Version " + app.MajorVersion.ToString + " " + app.MinorVersion.ToString + " " + "Non Development : " + app.NonReleaseVersion.ToString

Any idea as to why every time I build it never seems to auto increment.

Regards

From the documentation:

Auto Increment Version Info: When ON, the Non Release Version increases by one each time you do a Build.

Auto increment version only updates ‘Non Release Version’ number.

1 Like

You can do it within a Build Script.

Var vBuild As Int32 = Val(PropertyValue("App.MinorVersion"))
vBuild = (vBuild + 1)
PropertyValue("App.MinorVersion") = Str(vBuild)

The above works for “App.MajorVersion”, “App.MinoVersion”, “App.BugVersion” and “App.NonReleaseVersion”.

You’ll have to add your own logic that decides when to do the incrementing and whether it applies to Debug runs or Release only (or both).

As well, if you put your Build Script before the actual Build step, then you can call the new version numbers within your app and display it where you need it.

Hi there.
Thanks to everyone for the responses.

This script version , script version, script identifier… as those done by the IDE scripting tools or is that something you “turn on”. I only have build and sign in my Mac OS dropdown.

Regards

You create. Right click and create a new script.

1 Like

thanks.

You are going to laugh, but I was going through an old Xojo Tutorial on Script, and it came up about one minute after I wrote the question.

Once again, thanks for the help!

1 Like