So, we're working through the Visual Studio CTP for Hybrid apps. The version with the CTP is 3.4.0 of Cordova. There are a number of fixes which we need to do app testing with and have been made in 3.5.0. Does anyone know how to update the cordova version to 3.5 inside Visual Studio (or even outside Visual Studio) to work with the new CTP functionality?
Thanks
Note: Make sure you close all instances of Visual Studio before starting this process.
Update npm. To check your current npm version run the following command in a console:
npm -v
To update to the last version of npm run the following command in a console (elevated As Administrator):
npm install -g npm
Update Cordova. To check your Cordova version run the following command in a console:
cordova -v
To update to the last version of cordova run the following command in a console (elevated As Administrator):
npm install -g cordova
Update the vs-mda
version of Cordova with the latest you just installed in the previous step. Cordova is (globally) installed at %APPDATA%\npm\node_modules\cordova
. vs-mda
copy of Cordova is available at %APPDATA%\npm\node_modules\vs-mda\node_modules\cordova
. Replace the entire content of this folder with the one of the global Cordova installation.
concat-map
and balanced-match
. If anything else is necessary it should show up in the output log when you build your Cordova project.npm install -g concat-map
npm install -g balanced-match
Note: Make sure you stop the vs-mda-remote
agent before performing this
upgrade.
Open a Terminal session and run the following command:
sudo npm update -g cordova
vs-mda-remote
version of Cordova with the the latest you just installed in the previous step. Cordova is (globally) installed at /usr/local/lib/node_modules/cordova
. vs-mda-remote
copy of Cordova is available at /usr/local/lib/node_modules/vs-mda-remote/node_modules/cordova
. Replace the entire content of this folder with the one of the global Cordova installation.vs-mda-remote
agent.With all these installed you should be all set to start building with the latest version of Cordova.
Pay attention if you clear cordova cache
from Visual studio options menu, you need to do this procedure again. because it will copy older version into (for me 4.0.0) %APPDATA%\npm\node_modules\vs-mda\node_modules\cordova
NOTE: This works for all the platforms EXCEPT iOS. There's something hard coded somewhere else that I am still looking for. But for Android, Windows, etc (anything you can cpompile on Windows) this does solve the problem.
in %APPDATA%\npm\node_modules\vs-mda\node_modules\cordova\ there is a file called "platforms.js" In there are the URLs and versions used for each of the platforms for cordova. use the URL (on github) to check which specific versions you have/need - for example iOS had a 3.4.1. build, but android and WP7 did not. So don't just blindly change them all. Exit Visual Studio. Go into your project directory and delete everything in the bld directory. Now restart VS. Do a CLEAN on the project and then BUILD/RUN it - in the log you should see that the platform gets downloaded AND that the batch file run (create.bat) is now the new version. Hope they make this easier in the release...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With