Automatically increase the build number in xamarin forms app

ThaboSivaThaboSiva LKMember ✭✭

Any one know how to automatically increase the build number in Android and IOS projects (whenever i do the release build)?

Note:
I am developing Xamarin forms app .

Regards
Thabo

Best Answer

Answers

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    There's nothing in either the build process or the IDE that will take care of this automatically for you.

    You will need to use some kind of build script or a build server.

  • ThaboSivaThaboSiva LKMember ✭✭

    @DavidDancy Yes I am just looking for some build scripts or how to apply in the context of xamarin forms.I couldn't find anything on their guideline.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    There's nothing official published as far as I know. However if you look at the web sites of the various build systems that look after Xamarin projects you'll see quite a lot of support for it.

    Try looking at FAKE, Cake, Jenkins, TeamCity or VSTS & BitRise (cloud).

  • ThaboSivaThaboSiva LKMember ✭✭

    @ClintStLaurent Thank you this could an immediate solution do increase the version numbers. I will mark this as an accepted answer. By the way may be i need to try @DavidDancy Suggestion when i integrate the solution for CI.

  • EkjonEkjon Member ✭✭

    BTW Clint, I am new to Xamarin forms, iOS. Could you please elaborate on the use of Automatic Versions plugin.
    Should that be added to the shared or iOS project. And does it actually update the info.plist vesion number etc.
    And if anything else needed to make it work.

    Thanks very much.

  • NMackayNMackay GBInsider, University mod

    If you use devops/vsts (and other pipelines) you can also bump the version and push out new builds via CI with automatic versioning..

  • EkjonEkjon Member ✭✭

    Thanks Mackay.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @Ekjon said:
    BTW Clint, I am new to Xamarin forms, iOS. Could you please elaborate on the use of Automatic Versions plugin.
    Should that be added to the shared or iOS project. And does it actually update the info.plist vesion number etc.
    And if anything else needed to make it work.

    Thanks very much.

    AutomaticVersion is a Visual Studio plugin - not a package/nuget for your solution. But it has per-solution options. So you can set SolutionAlpha to update on every build... and SolutionBravo to update only the minor build on debug versions... and so on.

  • EkjonEkjon Member ✭✭

    Thanks Clint.

Sign In or Register to comment.