Search code examples
visual-studiocordovavisual-studio-2015intel-xdk

how to move a cordova project from intel xdk to visual studio


I'm trying to move a project created in Intel XDK to Visual Studio 2015. I used the file > new > project from existing code ... option to create a new project in VS from the Intel XDK project.

I commented out the script line for the cordova.js file. because i read somewhere that VS creates and inserts for you.

when i go to build i get:

cordova-build error BLD105: The Cordova build did not recognize your working directory as a Corvova-based project. This is often because the "www" directory is not at the root of your project

I have a www directory in the project folder.

I determine that the cause was i didn't have a config.xml file in the root directory. it seems the XDK application creates the config.xml when it calls Cordova to do a build.

I have the following questions:

  1. What is the best way to get a config.xml file?
  2. Is there any other gotchas from moving the project?

Solution

  • The easiest way is to make a new Cordova project, open config.xml by viewing the code instead of in the designer, select all & copying it to your clipboard. Then, re-open your XDK project, add a new item, call it config.xml and drop your clipboard contents into it.

    You may need to re-configure a bunch of settings to get parity with what Intel does, but this should unblock the build.

    (Disclosure: I work on the Tools for Apache Cordova in Visual Studio at Microsoft. And thanks for using our tools!)