Forum Cross Platform with Xamarin

How to create a nuget package from xamarin project?

I am new to cross platform development
I have downloaded modernhttpclient open source code from project is a shared project containing PCL and platform specific projects as well.
I have modified Android specific code related to socket creation in the android project.
Now i need to package this in to DLL/nuget package which is used in other Project in the PCL layer.
So I need help on, how to package this open source code to get the dll/nuget to get to use in PCL project.
I am stuck up at this step from past 3 days


  • mattwardmattward GBMember Xamurai

    I would download the ModernHttpClient NuGet package and take a look inside to see what folder layout you need. The .nupkg file is just a .zip so you can rename it and unzip it.

  • ranjitrranjitr USMember ✭✭

    @ mattward thanks . I unzipped the nuget package and there i found that there are different folders monoandroid,monotouch and portable as well.
    And respective dll are place in it.
    Correct me if i am wrong.
    So I need to place platform specific DLL in the folder and build nuget package using nugetpackageexplorer.exe.

  • mattwardmattward GBMember Xamurai

    Yes each platform specific dll needs to be in its own folder inside the NuGet package.

    You can build the NuGet package using NuGet Package Explorer or using nuget pack from the command line. Whichever you find easier.

Sign In or Register to comment.