web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Platform Set Sol...
Power Apps
Answered

Power Platform Set Solution Version: ##[error]Invalid number of components in version.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

I want to update the version number of a Power Apps solution from within an Azure pipeline. However, the invalid number of components error is thrown at me.

 

Settings:

  1. Task: Power Platform Set Solution Version
  2. Solution Version Number: $(Build.BuildNumber)

Error: 

  1. ##[error]Invalid number of components in version. Version: 18
Probably easy to fix, but I can't find my mistake if I compare my settings to the tutorial that I was following.
 
Kr,
Arthur

 

I have the same question (0)
  • Verified answer
    Eline Profile Picture
    25 on at

    Eline_0-1637834881650.png

    Hi Meijrink,
    You should set the Build number format in the options tab of the pipeline. That will solve the issue.

     

  • moshe raab Profile Picture
    80 on at

    I need to do a similar thing, i.e. just increment the revision number.

    In Options i set the Build Number Format to:

    $(version.MajorMinor).$(version.Patch).$(Rev:r)

     

    In the Power Platform Set Solution Version task i set the Solution Version Number to $Build.BuildNumber)

     

    I get this error :

    ##[error]Invalid number of components in version. Version: $(version.MajorMinor).$(version.Patch).$(Rev:r). this should translate to: 1.0.0.2

     

    what am i doing wrong?

  • AndrewElans Profile Picture
    44 on at
    Ref. "Power Platform Set Solution Version" in Azure DevOps. Version : 2.0.17
     
    Only the following params work smoothly based on my experience:
     
    Solution Name: shall be the same as solution "Name" in Environment, otherwise gives error: "The solution: \'xxx\' is not found in the target Dataverse organization"
     
    Solution Version Number: $(Build.BuildNumber) - shall be in format "x.x.x.x", works only if settings of pipeline -> "options" tab -> "Build number format" is filled in with something like $(Date:yyyy).$(Date:MM).$(Date:dd).$(Rev:rr), otherwise give the following error: "[ 'Error: Argument \'--solution-version\' is invalid. Unable to determine the version for \'2023032306\'.' ]"
     
    Alternatively, Solution Version Number can be "1.0.0.$(Build.BuildNumber)" if "Build number format" is filled in with "$(Date:yyyyMMdd)$(Rev:rr)", or other variations considering template "x.x.x.x"
     
     
    Related Links: 
     
    Part "While version number can be hardcoded in the pipeline, it is recommended to use an Azure DevOps pipeline variable like BuildId. This provides options to define the exact shape of version number under the "Options" tab, for example: $(Year:yyyy)-$(Month:MM)-$(Day:dd)-$(rev:rr)-3. This definition can then be used in the Set Solution Version task by setting the Version Number property with: $(Build.BuildId) instead of hard coding 20200824.0.0.2."
     
    shall be rewritten in my opinion to: "While version number can be hardcoded in the pipeline, it is recommended to use an Azure DevOps pipeline variable like BuildNumber. This provides options to define the exact shape of version number under the "Options" tab, for example: $(Date:yyyy).$(Date:MM).$(Date:dd).$(rev:rr). This definition can then be used in the Set Solution Version task by setting the Version Number property with: $(Build.BuildNumber) instead of hard coding 2023.03.23.03."
     
     
    command which is executed behind the tool to set solution name and version: 
    pac solution online-version --solution-name Samplesolution --solution-version 1.0.0.2

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard