Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NET MAUI Application Display Version value incorrect

I am using my NET MAUI project properties > MAUI Shared > General > Application Display Version to set app version (example below):

enter image description here

However, when I call:

AppInfo.Current.Version.ToString()

On my app about page the value is always '1.0.0'.

Am I not using the correct setting?

Edit:

Actually looks like my issue was related to deployment on 'iOS Local Device'. I tested on Android emulator and seeing the correct values:

[Android Emulator] enter image description here

[iOS Local Device] enter image description here

I am learning testing on 'iOS Local Device' does not deploy a lot of features: splash images, icon, and looks like some app info.

Edit 2:

Filed issue on MAUI repo: https://github.com/dotnet/maui/issues/20000

like image 317
OtoNoOto Avatar asked Jul 17 '26 23:07

OtoNoOto


2 Answers

According to the docs Application display version:

The application display version for a .NET MAUI app is stored in the app's project file as the ApplicationDisplayVersion build property.

When the value of the Application Display Version field is updated, the value of the Version field in the application view in the Info.plist file will be automatically updated.

And it could be a potential issue or a limitation to correctly get the value of AppInfo.Current.Version only when deploying to iOS Local Device, Android works fine. You can report it to Github:https://github.com/dotnet/maui/issues and hopefully this will be fixed soon.

Hope this clarifies a little bit!

like image 84
Alexandar May Avatar answered Jul 19 '26 11:07

Alexandar May


You are in the right place, you can try to clean solution then run again. This is my illustration:

enter image description here

enter image description here

like image 35
Quoc Nguyen Avatar answered Jul 19 '26 12:07

Quoc Nguyen