0
在嘗試使用下面的行從Package.appxmanifest標識元素讀取Name
屬性的值:獲取通用Windows平臺的的AppId(UWP)應用
string PackageName => CurrentApp.AppId.ToString();
我得到這個異常:
The thread 0x22cc has exited with code 0 (0x0).
System.Exception: Exception from HRESULT: 0x803F6107
at Windows.ApplicationModel.Store.CurrentApp.get_AppId()
at MyApp.UWP.get_PackageName()
這不是通常的方式來訪問UWP清單中的Identity元素的Name屬性值嗎?
您正在測試哪個版本的Windows?我相信Windows Phone 8.1不支持這一點。 –
在Windows 10上進行測試.Windows phone 81確實對此有效。 – Adam
[如何獲取Windows通用應用程序中的應用程序版本?](http://stackoverflow.com/questions/25144054/how-to-get-app-version-in-windows-universal-app) – Romasz