license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
This guide describes how to set up your development environment for Cordova and run a sample application. Note that Cordova used to be called PhoneGap, so some of the sites still use the old PhoneGap name.
NOTE: Running in VM does not work well. If you are on a Mac, you need to set up a bootcamp partition with Windows 7 or Vista.
lib\windows-phone subfolder.CordovaWP7_2.9.0.zip to the \My Documents\Visual Studio 2012\Templates\ProjectTemplates\ folder. (If the template file does not exist, you need to build it as described in 2.1 below.) if you have just installed VisualStudio, you should launch it once to create this folder if you prefer, you may add the project instead to the Silverlight for Windows Phone subfolder of Visual C#. This is up to you, and only affects where the project template is shown when creating a new project. Also, You may need to create this folder.NOTE: Skip this step if the lib\windows-phone directory already contains a CordovaWP7_2.9.0.zip file.
Open the lib\windows-phone\templates\standalone\CordovaSolution.sln in Visual Studio Express for Windows Phone
Select Export Template... from the File menu.
Choose template type Project template
Supply a name of the exported template, such as CordovaStarter-2.1.0 to produce a CordovaStarter-2.1.0.zip file.
Optionally, add a description, icon image, or Preview image. These are displayed in Visual Studio's New Project dialog.
NOTE: If you select Automatically import the template..., then you don't need to copy the .zip file over as outlined in step 2.
Press Finish.
Open Visual Studio Express for Windows Phone and choose New Project.
Select CordovaStarter. (The version number displays in the template description.)
Give your project a name, and select OK.
The ‘www’ folder contains your Cordova html/js/css and any other resources included in your app.
Any content that you add needs to be a part of the Visual Studio project, and it must be set as content.
Make sure Windows Phone Emulator is selected in the main drop-down menu.
Press the green play button next to the drop-down menu to start debugging, or else type F5.
To test your application on a device, the device must be registered. MSDN provides documentation to help deploy and test your Windows Phone.
Make sure your phone is connected, and the screen is unlocked
In Visual Studio, select ‘Windows Phone Device’ from the top drop-down menu.
Press the green play button next to the main drop-down menu to start debugging, or type F5.
You can also checkout more detailed version of this guide here.