For the sake of simplicity, I want to change the default version number scheme of SFDX projects from Major.Minor.Patch.Build to Major.Minor like

"versionNumber": "0.1.0.NEXT"

to something like

"versionNumber": "1.NEXT"

but it won't let me do that. Is there a trick or is this simply not possible?


This isn't currently allowed because it's not necessarily a good idea. The way versions work in Salesforce is that each version installed is tracked by the platform. Metadata that depends on a version that was never installed will fail to deploy. This creates a big cat-and-mouse type problem for subscribers of these packages.

To minimize this disruption, you're only allowed to automatically increment build numbers, which do not affect metadata dependencies. Even if you could do this, I would recommend that you don't. It may be a convenience for you, but it may artificially introduce extra work needed to update orgs with new versions.

| improve this answer | |

This is not possible right now.

You have to manually change the minor or bug numbers to increment.

The idea was submitted to Salesforce product team over a year ago. No eta yet.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.