How to automatically fill Android application version number and application version name from Assembly Version in .NET MAUI?

Jan Seriš 1 Reputation point
2024-03-25T14:41:57.11+00:00

Hi,
Google Play and Android overall in order to correctly detect newer versions of applications, uses <ApplicationVersion></ApplicationVersion> tag in .csproj which accepts an integer value (e.g. 5).
The standard for C#/.NET projects regarding versioning is <Version> which is Assembly Version (e.g. 1.2.3 or 1.2.3.4)
Then Android uses <ApplicationDisplayVersion></ApplicationDisplayVersion> to display application version "name" to the users (e.g. "1.2.3")

How to please automatically synchronize these two from standard <Version>?

For example, <ApplicationVersion> is required to be unique for every Android app Google Play store release.

Thank you

Developer technologies .NET .NET MAUI
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.