Creating a NuGet from Existing Library Projects

PDF for offline use
Related Links:

Let us know how you feel about this

Translation Quality


last updated: 2017-04

Existing PCL or .NET Standard libraries can be turned into NuGets via the Project Options window:

  1. Right-click on the library project in the Solution Pad and choose Options.

  2. Go to the NuGet Package > Metadata section and enter all the required information in the General tab:

  3. Optionally, add additional metadata in the Details tab.

  4. Once the metadata is configured, you can right-click on the project and choose Create NuGet Package and the .nupkg NuGet package file will be saved in the /bin/ folder (either Debug or Release, depending on configuration).

  5. To create the NuGet package on every build or deploy, go to the NuGet Package > Build section and tick Create a NuGet Package when building the project:


Building the NuGet package can slow down the build process. If this box is not ticked, you can still generate a NuGet package manually at any time from the project context menu (shown in step 4 above).

Verifying the Output

NuGet packages are also ZIP files, so it's possible to inspect the internal structure of the generated package.

This screenshot shows the contents of a PCL-based NuGet – only a single PCL assembly is included:

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.