DEV Community

Wai Liu
Wai Liu

Posted on

Auto-incrementing your Power Platform solution version in your DevOps Pipeline

Just a quick enhancement to this post where we exported a solution from Power Platforms in order to commit to a source repo.

If you manually exported the solution in Power Platform, it would normally offer to automatically increment the version by one. This post will demonstrate how to do it with DevOps Pipeline as well.

Setting the build number format

build number format

This sets the format of the Pipeline's Build.BuildNumber property. What 1.0.1.$(rev:rr) means is that we want the version to be 1.0.1.x with x being appended by one each time.

Add Set Solution Version Step

Set Version

Add the Set Solution Version task before the export solution task. This step will actually go into your Dev environment's solution and update the version number to be the same as the BuildNumber.

Running the pipeline

Pipeline
When you run the pipeline, notice that the version number has changed from just a number to now in the 1.0.1.x format.

PR Solution

When you do a PR, you'll be able see that the version in the solution has also changed.

Discussion (0)