Upgrading Windows Phone
This guide shows how to modify Windows Phone projects, both versions 7
and 8, to upgrade from older versions of Cordova. Most of these
instructions apply to projects created with an older set of
command-line tools that precede the cordova CLI utility. See The
Command-Line Interface for information how to update the version of
the CLI. The following section shows how to upgrade from non-CLI
projects.
Upgrade to 3.2.0 from 3.1.0
For projects that were created with the cordova CLI:
Update the
cordovaCLI version. See The Command-Line Interface.Run
cordova platform update wp8(orwp7, per the platforms you added to your project).
For projects not created with the cordova CLI, run:
bin\update <project_path>
Upgrade to 3.1.0 from 3.0.0
For projects that were created with the cordova CLI:
Update the
cordovaCLI version. See The Command-Line Interface.Run
cordova platform update wp8(orwp7, per the platforms you added to your project).
For projects not created with the cordova CLI, run:
bin\update <project_path>
Upgrade to the CLI (3.0.0) from 2.9.0
Create a new Apache Cordova 3.0.0 project using the cordova CLI, as described in The Command-Line Interface.
Add your platforms to the cordova project, for example:
cordova platform add wp7 wp8.Copy the contents of the project's
wwwdirectory to thewwwdirectory at the root of the cordova project you just created.Copy or overwrite any native assets from your original project (
SplashScreen,ApplicationIcon, etc.), making sure to add any new files to the.csprojfile. The windows phone project builds inside theplatforms\wp7orplatforms\wp8directory.Use the cordova CLI tool to install any plugins you need. Note that the CLI handles all core APIs as plugins, so they may need to be added. Only 3.0.0 plugins are compatible with the CLI.
Build and test.
Upgrade to 3.0.0 (non-CLI) from 2.9.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 3.0.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
NOTE: all core APIs are removed from Cordova version 3.0, and must be installed separately as plugins. For more information on how to re-enable these features in a non-CLI workflow, see Using Plugman to Manage Plugins.
Upgrade to 2.9.0 from 2.8.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 2.9.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update the name of
cordova.jsin the HTML tag if it's still using cordova-VERSION.js (should be justcordova.js).Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the .csproj file.Build and test.
Upgrade to 2.8.0 from 2.7.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 2.8.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova.jsfile. (Note the lack of a version number in the filename.)Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.7.0 from 2.6.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 2.7.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.7.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.6.0 from 2.5.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 2.6.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.6.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.5.0 from 2.4.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 2.5.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.5.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.4.0 from 2.3.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 or WP8 2.4.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.4.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.3.0 from 2.2.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 2.3.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.3.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.2.0 from 2.1.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 2.2.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.2.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.1.0 from 2.0.0
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 2.1.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.1.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 2.0.0 from 1.9.0
There have been considerable changes to the WP7 project structure in Apache Cordova 2.0.0 which make this upgrade a little more involved that the others. Essentially this is not an upgrade but creation of a new project and copy over of existing source files.
In Visual Studio's Solution Explorer window:
Create a new Apache Cordova WP7 2.0 Project.
Copy the contents of your
wwwdirectory to the new project, and be sure these items are added to the VS project.Update your HTML to use the new
cordova-2.0.0.jsfile.Copy and overwrite any splash screen, or icon images.
Copy over any plugins from the
pluginsdirectory to the new project and ensure that they are also added to the VS project.Build and test.
Upgrade to 1.9.0 from 1.8.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.9.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.9.0.jsfile.
Upgrade to 1.8.0 from 1.7.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.8.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.8.0.jsfile.
Upgrade to 1.7.0 from 1.6.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.7.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.7.0.jsfile.
Upgrade to 1.6.1 from 1.6.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.6.1.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.6.1.jsfile.
Upgrade to 1.6.0 from 1.5.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.6.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.6.0.jsfile.
Upgrade to 1.5.0 from 1.4.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.5.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.5.0.jsfile.
Upgrade to 1.4.0 from 1.3.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.4.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.4.0.jsfile.
Upgrade to 1.3.0 from 1.2.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.3.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.3.0.jsfile.
Upgrade to 1.2.0 from 1.1.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: You can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.2.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.2.0.jsfile.
Upgrade to 1.1.0 from 1.0.0
In Visual Studio's Solution Explorer window:
Delete
GapLib/WP7CordovaClassLib.dllfrom your project.Remove the reference to
WP7CordovaClassLibin the References directory.Right-click on References and select Add Reference.
-
Navigate to the new distribution and add the
WP7CordovaClassLib.dllfile.NOTE: you can view the DLL's version by right-clicking on the reference, and selecting Properties.
Copy the new
cordova-1.1.0.jsinto your project. (Be sure it is marked as Content.)Update your HTML to use the new
cordova-1.1.0.jsfile.