Deploy cordova windows app to phone from Visual Studio
I used cordova 6.0.0 CLI to create a new app:
cordova platform add windows
cordova build windows -- --appx=uap
I open the file /platforms/windows/CordovaApp.sln in Visual Studio Community. Now I can deploy the app to "Simulator", "Local Machine" and "Remote Machine".
How do I deploy to my USB-connected Windows Phone 10 device?
If I use Cordova to create a wp8 app and open that project in VS, I can deploy to the phone.
First of all, lets clean the windows platform.
- $cordova platform remove windows
- $cordova platform add windows
- $cordova build windows --release
This will create package to platforms\windows\AppPackages
Then you can see the folder: CordovaApp.Windows_0.1.0.0_anycpu_debug_Test
which has Add-AppDevPackage.ps1 file inside.
By right clicking this file and run it on Powershell you can install it. In order to send package via usb, you can zip CordovaApp.Windows_0.1.0.0_anycpu_debug_Test folder and then you can install it other devices by running Add-AppDevPackage.ps1 on powershell.
If you want to debug your application on windows 10 machine, you should use remote debugging tools of visual studio. Instead of selecting local machine or simulator, select remote machine. Configure the connection name of the remote device in visual studio. Then you should install vs remote debugger to your windows 10 machine. With this you can connect it remotely and debug it.