1

In Delphi XE7 there is an option called "Auto increment build number". I would like to have that. But whenever I build, the version number remains identical.
I do understand that compile will not change the number, only Build will change it. What to activate that feature?


Update:
People seem to confirm this is a bug. However, the solution proposed doesn't work for me. I have "Auto increment build number" active for ALL configurations:

enter image description here

enter image description here

Gabriel
  • 20,797
  • 27
  • 159
  • 293
  • Are you switched to the same build configuration which you configured? – Jerry Dodge Nov 25 '19 at 19:27
  • These settings are per build configuration. So the same settings are there more than once. You can switch between, for example, "Debug" and "Release". Are you switched to the same combination? – Jerry Dodge Nov 25 '19 at 19:28
  • Yes, yes! of course. I see "Auto increment build number" selected for ALL configurations (win32/debug/release/pre-release). – Gabriel Nov 25 '19 at 19:28
  • It doesn't work for "All Configurations". You need to set it on each specific one. Please [edit] your question to include that detail, then your question can be properly answered. – Jerry Dodge Nov 25 '19 at 19:30
  • 1
    I'm not sure how to reproduce. New project, changed only to *Auto increment build number* and build the project. The build number has changed from 0 to to 1, when I open the *Project Options* page again. The version in the exe file is however 1.0.0.0 probably because the number is advance after a build is made. Tried a second build, and the exe shows 1.0.0.1 and the number in the options dialog is 1.0.0.2. Just as expected. – Tom Brunberg Nov 25 '19 at 20:23
  • @TomBrunberg As my comments and answer explain, the problem is that OP is applying that change on "All Configurations - All Platforms" which further gets overwritten on the specific level. – Jerry Dodge Nov 25 '19 at 20:39
  • 1
    @Jerry Yes, you are right. First I had the `Debug configuration` selected. Now with a second try with `All ...` I can confirm it is related to `All...`. But I was still not able to get it to work as you said in the old answer *but I was able to resolve this by re-enabling the version information on the "All Configurations" level.* Anyway, your answer here seems to be right. – Tom Brunberg Nov 25 '19 at 20:50
  • 1
    It's a shame to post an answer for someone with such high reputation but yet a history of not always marking answers as accepted... Just take the answer and forget about the question... – Jerry Dodge Nov 26 '19 at 00:32
  • Thanks Tom. Based on what you said, I came up with the idea to delete the DPROJ file. If AutoIncement works for you (and you have XE7) it should work for me also. I will let you know how it worked tonight. – Gabriel Nov 26 '19 at 08:29
  • There are three persons here with the same bug manifesting in three different ways. It could very well be a bug that manifests randomly. That part of Delphi ("Project Options") was always very buggy. – Gabriel Nov 27 '19 at 08:41
  • @WeGoToMars Yes, that screen is buggy, but as I've explained multiple times, **this is not a bug, it is expected behavior**. – Jerry Dodge Nov 27 '19 at 12:53

1 Answers1

4

This setting doesn't really work on "All Configurations" or "All Platforms". In fact, I had a similar issue which caused weird behavior.

You need to set this on each specific build configuration and platform combination. It won't work on "All" because it gets overwritten anyway.

Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
  • The issue applies to all versions of Delphi which have build configurations. It makes zero sense to apply these settings on "All Configurations" level, because it is forcibly overwritten. Have you tried what I said? – Jerry Dodge Nov 25 '19 at 19:34
  • @WeGoToMars You are still on "All Platforms" - still doesn't work. You need to narrow it all the way down to the **specific** combination of build configuration **and** platform. As I said, it gets **overwritten** by the specific target level. – Jerry Dodge Nov 25 '19 at 19:44
  • @WeGoToMars I can confirm that Jerry's answer is valid for XE7 – Tom Brunberg Nov 26 '19 at 11:22
  • @WeGoToMars This is not really a bug - this is expected behavior. There is a hierarchy of settings, and the "All" options get overwritten the further down the hierarchy goes. This applies to all versions of Delphi which have these configurations. – Jerry Dodge Nov 26 '19 at 19:07
  • @WeGoToMars Further, I'd advise *not* to mess around with changing the option whether to include version information or not on each level, hence my reference to my other question (related but not duplicate). Just leave those settings as-is. Don't rely on applying those settings on any higher level of hierarchy - narrow it *all the way down* to the specific config/platform combination, as I explained in my answer. I'm not sure why Embarcadero even made it an option to modify those settings on a higher level of hierarchy - it makes no sense. Yes, it's buggy, but this is not a bug. – Jerry Dodge Nov 27 '19 at 00:23
  • @TomBrunberg-Thanks. I will fiddle arround and see why it doesn't work for me. – Gabriel Nov 27 '19 at 08:46