Closed ComptonAlvaro closed 1 year ago
Hi @ComptonAlvaro , I think the best way to do stuff with app versions in .NET MAUI is using the .NET MAUI Essentials Version Tracking features: https://learn.microsoft.com/dotnet/maui/platform-integration/appmodel/version-tracking. It has many useful features for checking various conditions, but it also has a VersionTracking.Default.CurrentVersion
API that looks like it might be what you need here.
@Eilon Thanks so much. This works perfectly and it is easier than they way I was trying.
Thanks so much.
Description
At runtime, I would like to know the version of the assembly, for that, I am using this code:
it works when I debug the application, but when I publish it to create the apk and I install it, I get this exception:
Android.runtime.javaProxyThrowable:Syste.IO.FileNotFoundException:/MyApplication.dll at System.Diagnostics.FilveVersionInfo.GetVersionInfo(string)
The message is clear. It seems it is not possible to find the .dll. Perhaps when the application is published, there is not a .dll from which to get the version.
So I would like to know how could I know the version of the application at runtime.
Thanks.
Steps to Reproduce
Link to public reproduction project repository
It is not needed
Version with bug
7.0.49
Last version that worked well
7.0.86
Affected platforms
Android
Affected platform versions
Android API 31
Did you find any workaround?
I have not found any workaround.
Relevant log output
No response