Xamarin.Android | ComponentOne
Getting Started with Xamarin.Android Controls / Adding NuGet Packages to your App
In This Topic
    Adding NuGet Packages to your App
    In This Topic

    To install NuGet

    1. Go to https://www.nuget.org/ and click Install NuGet.
    2. Run the NuGet.vsix installer.
    3. In the Visual Studio Extension Installer window, click Install.
    4. Once the installation is complete, click Close.

    To add Xamarin References to your App

    In order to use Xamarin controls on Android platform, related references need to be added to your project. Complete the following steps to add Xamarin references to your project.

    1. Open an existing or a new Xamarin.Android App.
    2. In the Project menu, select Manage NuGet Packages.
    3. In the Manage NuGet Packages dialog, click Online and then click MESCIUS.
    4.  Click Install next to C1.Android.ControlName (eg. C1.Android.Chart). This adds the references for Xamarin control.
    5. Click I Accept to accept the license and then click Close in the Manage NuGet Packages dialog.
    1. Open an existing or a new Android app.
    2. In the Solution Explorer, right-click the project and select Add | Add NuGet Packages. The Add NuGet Packages dialog appears.
    3. From the drop down menu in the top left corner, select MESCIUS. The available Xamarin packages are displayed.
    4. Select the package C1.Android.Control and click the Add Package button. This adds the references for the Xamarin control.

    To manually create a Xamarin feed source

    1. In the Tools menu, select NuGet Package Manager | Package Manager Settings. The Options dialog appears.
    2. In the left pane, select Package Sources.
    3. Click the Add (+) button in top right corner to add a new source under Available package sources.
    4. Set the Name of the new package source. Set the source as https://api.nuget.org/v3/index.json.   
    5. Click OK. The Xamarin feed has now been added as another NuGet feed sources.                     

    To install Xamarin using the new feed:

    1. Open an existing or a new Android app.
    2. Select Project | Manage NuGet Packages.
    3. In the Manage NuGet Packages dialog, go to the Online drop down and select Xamarin. The available Xamarin packages get displayed in the right pane.
    4. Click Install next to the NuGet package (for example, C1.Android.Chart). This updates the references for the Xamarin control.
    5. Click I Accept to accept the ComponentOne license for Xamarin and then click Close in the Manage NuGet Packages dialog.
    1. In the Projects menu, select Add Packages.
    2. In the Add Packages dialog, open the drop-down menu in the top left corner and select Configure Sources. The Preferences dialog appears.
    3. In the left pane, expand Packages and select Sources.
    4. Click the Add button to open the Add Package Source dialog.
    5. Set the Name of the new package source as Xamarin and the URL as https://api.nuget.org/v3/index.json
    6. Click Add Source button to add the Xamarin feed as a new feed source.
    7. Click OK.

    To install Xamarin using the new feed: 

    1. Open an existing or a new Android app.
    2. In the Solution Explorer, right-click the project and select Add | Add Packages. The Add Packages dialog appears.
    3. In the Add Packages dialog, open the drop-down menu in the top left corner and select Xamarin. The available packages are displayed.
    4. Select the package (for example C1.Android.Chart) and click the Add Package button. This adds the references for the Xamarin control.