Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kMSC8o2vWekOB+UVPKAsRf
Power Apps - Power Apps Pro Dev & ISV
Answered

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

Like (0) ShareShare
ReportReport
Posted on 24 Nov 2021 18:39:49 by

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

 

  • AndrewElans Profile Picture
    44 on 23 Mar 2023 at 16:05:57
    Re: Power Platform Set Solution Version: ##[error]Invalid number of components in version.
    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
  • moshe raab Profile Picture
    80 on 01 Jun 2022 at 13:31:43
    Re: Power Platform Set Solution Version: ##[error]Invalid number of components in version.

    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?

  • Verified answer
    Eline Profile Picture
    25 on 25 Nov 2021 at 10:08:52
    Re: Power Platform Set Solution Version: ##[error]Invalid number of components in version.

    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.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 40 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 29 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 20 Super User 2025 Season 1

Overall leaderboard
Loading started