Install an appx or appxbundle in a Windows Phone 10?

早过忘川 提交于 2020-01-30 08:27:05

问题


I'm developing an UWP app which is running without any troubles when it's being debugged using VS2015 but when it's installed using an appx or appxbundle.

I've read many packaging and installation guides and it doesn't seem I'm leaving steps out (I just need to deploy the app in a device for testing purposes only), but this behavior makes me wonder if maybe I am...

I'm not sure if I've let enough information but I really don't know what else to explain :(

Could anyone tell me what should I do to find out what is making the app crash? Or something to fix it?

Thanks much in advance!


回答1:


Here's a shot in the dark...

When installing yourself you'll need to install any dependency packages yourself. If you look at you appxmanifest you'll see a Dependency node that lists other "framework" packages (ex: VCLibs, .NET Native Runtime). For machines with VS installed on them you can fine these packages under Program Files (x86) in a folder with other Extension SDKs.




回答2:


Go to project properties -> Build and enable "Compile with .NET Native tool chain" for "Debug" configuration. This may help in finding the exact issue.




回答3:


One way of debugging this would be to export the appx files using the tool in Visual Studio and during the export process to make sure that the debug symbols are included and the app has been exported using the debug profile (see this MSDN article on packaging Universal Windows Apps but instead of building them for store upload, choose to not build them for store upload). This should ensure that the app is outputting any debug messages.

Once you have the appx files (or the appxbundle, either one can be used) upload it to the device. You can either use the WinAppDeployCmd tool (see the sideloading part of the previous link), use the phone's device portal (only available after Windows 10 version 1511, see MSDN article on Enabling the device for development for details on how to use it) or copy the files to the phone's storage then install them from there.

To install from the local storage, copy the entire AppPackages folder to your device then open that folder in the device's file manager. First of all, open the certificate file to install it to your device, this will mean that the device trusts your app package because it was signed with that certificate. Next, go to the dependencies folder and open all the files in there to install all the dependencies to the device (this step is done automatically when deploying from Visual Studio or the Windows Store). Once all the dependencies have been installed, open the appx file for the device's architecture (should be the ARM file) to install it.

Once you have the app installed on your device with all the dependencies, launch it. If it runs fine, it means it wasn't a dependencies issue, if it doesn't and if you have version 1511 or newer of Windows 10, a dump file should have been created in your phone's Documents/Dumps folder (see the MSDN article on Enabling the device for development and go down to the error reporting part at the bottom of the page).



来源:https://stackoverflow.com/questions/34829321/install-an-appx-or-appxbundle-in-a-windows-phone-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!