For creating my apk and ipa file for my Xamarin.Android and Xamarin.iOS projects with the pipeline I need the version number from the AndroidManifest.xml and Info.plist as a variable for use in my yaml config file. I'm changing the version number before pushing to my build branch.
What ways are there to get the version?
I finally found a way:
The version number is in the
AndroidManifest.xml:If you got AAPT (Android Asset Packaging Tool, https://androidaapt.com) installed on your device you can use it for retrieving the version like this:
It will return just the version number:
1.0.1Just run all of this in a script task in your build pipeline and assign the return value to a local or output variable.