prism-storeapps

Retrieve the Current App version from Package

混江龙づ霸主 提交于 2019-11-29 00:58:46
While I can get the assembly version using the following code var assembly = typeof(App).GetTypeInfo().Assembly; var assemblyVersion = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version; I would like to retrieve the Version from Package.appxmanifest in this case 1.0.0.4 <?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest"> <Identity Name="zzz" Publisher="CN=zzz" Version="1.0.0.4" /> I expected to have access to Windows.ApplicationModel , but this is not available to me

Retrieve the Current App version from Package

跟風遠走 提交于 2019-11-27 15:31:25
问题 While I can get the assembly version using the following code var assembly = typeof(App).GetTypeInfo().Assembly; var assemblyVersion = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version; I would like to retrieve the Version from Package.appxmanifest in this case 1.0.0.4 <?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest"> <Identity Name="zzz" Publisher="CN=zzz"