Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add plugin to the Visual Studio Cordova project

How can I add the remote (git) plugin to the cordova/phonegap project, created with Visual Studio phonegap template? I can't just change current directory to the VS project in CLI via cd and call add plugin ..., because it fails with "project directory could not be found". Thank you.

like image 954
pandomic Avatar asked Jul 03 '14 14:07

pandomic


People also ask

Which command is used to install plugin in Cordova?

Add Plugin Features 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 run a Cordova project in Visual Studio?

Select Add new app from the menu. Enter a name for your application project, adding an optional description as needed. Select the appropriate OS for your application project (Android or iOS only), then select the Cordova platform option. Click the Add new app button on the bottom-right corner of the page.


1 Answers

You can add plugin through Visual Studio also, following are steps to add custom plugin

  1. Download the plugin from GitHub as a .zip file
  2. Extract the contents of the .zip file and add them to your project
  3. In Solution Explorer, open the shortcut menu for your project, and then choose Add, New Folder. Name the folder plugins
  4. Add the code files for your plugin in a subfolder, matching the plugin's folder and file structure
  5. Build your app to add the plugin

Refer Manage Plugins for Your Multi-Device Hybrid App document for more detail on adding plugin

like image 67
Abhishek - MSFT Avatar answered Nov 11 '22 20:11

Abhishek - MSFT