我正在为 Windows 10 桌面版和移动版开发一个新的 UWP 应用程序。PhoneIdentity似乎是 .appxmanifest 文件中的必填项。虽然 MSDN 明确说明了PhoneProductId
应该是什么,但如果应用程序是升级版,它并没有解释使用什么价值,以防万一。
由于此应用程序不是升级,我的第一反应是使用空 GUID ( 00000000-0000-0000-0000-000000000000
)。这样做会导致 Visual Studio 在尝试部署应用程序以进行调试时返回错误:
1>------ Deploy started: Project: MyApp, Configuration: Debug ARM ------ Deploying to Phone Internal Storage... Updating the layout... Copying files: Total <1 mb to layout... Checking whether required frameworks are installed... Registering the application to run from layout... DEP0700: Registration of the app failed. [0x80073CF6] Package could not be registered. (Exception from HRESULT: 0x80073CF6) ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
将 设置PhoneProductId
为随机 GUID 似乎可以解决部署问题,尽管没有任何文档我对做某事有点不安,这似乎有效,但不知道它为什么有效。
是否有特定的 GUID 可用于不是升级的应用程序?如果不需要,此 GUID 是否需要遵循任何特定协议(例如特定版本或类型,或从应用程序生成Identity Name
)?