Install specific version of Cordova CLI in Visual Studio 2017

前端 未结 4 1037
囚心锁ツ
囚心锁ツ 2020-12-06 14:46

I need to do some updates to a Cordova app created using Visual Studio 2017 Tools for Apache Cordova (TACO).

The Cordova CLI version listed in the config.xml file is

相关标签:
4条回答
  • 2020-12-06 14:56

    I don't have the authority to add a comment to the answer above, so adding my updates here:

    If the version is still not update to the latest, please try the below steps to fix the issue:

    First, modify your project config.xml file using an editor, rather than through the tools. Not sure why it was necessary, but this was the key difference from the above instructions. I also found that 4.3.1 was best. Remove any ~ characters before the version.

    Then:

    1. Clear the cordova cache under: Tools->Options->Tools for Apache Cordova->Clear Cordova cache.

    2. Open cmd of your project folder

    3. Type npm install -g cordova-ios to install globally the cordova-ios(requires node installed as pre-work)

    4. Then cordova platform rm ios

    5. Type cordova platform add ios

    6. Run your project again

    If the cordova command in steps 4 and 5 doesn't work, add the cordova bin directory to you path. In my case

    C:\ProgramData\Microsoft\VisualStudio\MDA\ad0a0856\taco-toolset-6.3.1\node_modules.bin\

    0 讨论(0)
  • 2020-12-06 15:04

    I had the same error, follow this steps :

    1- If not installed yet, install Node

    2- Install the latest version of cordova or anyother:

    npm install -g cordova
    

    3- Install taco-cli:

    npm install -g taco-cli
    

    4- Configure taco-cli :

    taco remote add ios
    

    (respond a few question, MAC IP, Port,etc...)

    5- in your root project add or edit a file named "taco.json", add inside :

    {
        "cordova-cli": "7.1.0"
    }
    

    Where 7.1.0 correspond to your cordova version (cordova --v)

    6- Try to emulate on your MAC:

    taco emulate ios
    

    You will maybe have an error about platform. Ignore it

    7- Close then open Visual Studio

    8- On Visual Studio open the config.xml UI EDITOR and change the toolset name with

    Global cordova

    9- Build using Visual Studio.

    If it doesn't work, please let me know

    0 讨论(0)
  • 2020-12-06 15:10

    I don't see any updates to TACO in VS2017 or instructions in the Microsoft documentation for Apache Cordova Tools.

    You can follow below steps to use the latest cordova-ios:

    1. Open config.xml with designer
    2. Toolset->Check the checkbox of Take latest patch(requires internet) on cordova-ios row.

    Update:

    If you don't see the checkbox in the designer page, you need to change it in the xml. Find the following tag in config.xml:

    <engine name="ios" spec="4.2.0" />
    

    and modify it to:

    <engine name="ios" spec="~4.2.0" />
    

    Update2:

    If the version is still not update to the latest, please try the below steps to fix the issue:

    1. Clear the cordova cache under: Tools->Options->Tools for Apache Cordova->Clear Cordova cache.
    2. Open cmd of your project folder;
    3. Type npm install -g cordova-ios to install globally the cordova-ios(requires node installed as pre-work);
    4. Then cordova platform rm ios;
    5. Type cordova platform add ios;
    6. Run your project again
    0 讨论(0)
  • 2020-12-06 15:11

    For iOS, please install iOS@4.3.1. This is the only version i found working with XCode 8.3.3

    0 讨论(0)
提交回复
热议问题