Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Plugins to Visual Studio Cordova project

I have a new blank cordova project that I would like to install a plugin into,

http://plugreg.com/plugin/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin

I've tried the following,

  1. open up cmd
  2. browse to application folder, containing .sln file
  3. install cordova using npm
  4. run 'cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git'

I receive the following error,

'Current working directory is not a Cordova-based project.'

Any idea how I get this to work, assuming that I can that is?

like image 470
Nick Avatar asked Sep 08 '14 09:09

Nick


People also ask

Which command is used to install plugin in Cordova?

The cordova plugin add command requires you to specify the repository for the plugin code. Please note that when you follow the Web Project Dev workflow and use the CLI, the CLI will take care of adding the plugin code to the appropriate place for each platform.

How do I add a plugin to config XML Cordova?

When adding plugins or platforms, use the --save flag to add them to config. xml. Ex: cordova platform add android --save. Existing projects can use cordova plugin save and cordova platform save commands to save all previously installed plugins and platforms into your project's config.

Does Visual Studio support Cordova?

Visual Studio and CordovaMicrosoft recently released a preview of the Visual Studio Tools for Apache Cordova, which is an add-in package for Visual Studio 2013 (or it comes built-in with Visual Studio 2015 Preview) that allows you build Cordova applications right out of the familiar Visual Studio environment.


1 Answers

Visual Studio Tools for Apache Cordova CPT3.0 added feature to add custom plugin, now you can use config.xml to add plugin from Git.

You can get more detail to install Visual Studio Tools for Apache Cordova CPT3.0 here. CPT3.0 requires to uninstall CPT2.0 and install Visual Studio Update 4 before installing CPT3.0

enter image description here

like image 64
Abhishek - MSFT Avatar answered Oct 04 '22 13:10

Abhishek - MSFT