Click here to Skip to main content
15,114,081 members
Articles / NuGet
Technical Blog
Posted 17 Oct 2016

Tagged as

Stats

9.7K views
15 bookmarked

Create and Publish a NuGet Package Easily - Overview

Rate me:
Please Sign up or sign in to vote.
4.73/5 (5 votes)
5 Nov 2016Ms-PL1 min read
How to create and publish a NuGet package easily
  1. Go to https://npe.codeplex.com/ and download NuGet Package Explorer.

    image

  2. Run NuGetPackageExplorer and select Create a new package.

    image

  3. The next step is to enter some information about your package, for that select Edit Metadata.

    image

  4. Fill out all the relevant information about your package, this will help the users to find your package and install them.

    image

  5. If your package has any dependencies, you can add them by selecting Edit dependencies.

    image

  6. On selecting edit dependencies, Package Dependency Editor will open and there you can add a Group and select image Dependency from NuGet feed.

    image

  7. A new window will open where all the NuGet packages are listed, there you can search for a particular package and you can also select the specific version.

    image

  8. After selecting the dependencies, you can come back to Package contents, there you can Add Content Folder, Add Lib Folder or other folders required for your package. These folders will help you chose the location where you want to drop the files when user installs your package.

    image

  9. You can create files with extension .cs.pp where you can have placeholders and these will get transformed when the user installs the package depending on the project.

    image

  10. That’s it after you are done configuring everything you can choose Save As or Publish directly to nuget.org.

    image

Yeah, I know that was easy right? but rather than directly publishing the package on nuget.org, I prefer saving it on my local system and test it before I publish it. How to do that is simple. Open your Visual Studio, go to Tools>Options.

image

In the options, go to NuGet Package Manager and select Package Sources. There, you can add the Local NuGet Source where you saved the package you built. This is help you install and test your package before even you publish it.

image

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

Arun Endapally
Architect Thomson Reuters
India India
No Biography provided

Comments and Discussions

 
QuestionCool ! Pin
HeleneDaniel4-Dec-16 21:06
MemberHeleneDaniel4-Dec-16 21:06 
GeneralMy vote of 4 Pin
E. Scott McFadden18-Oct-16 13:45
professionalE. Scott McFadden18-Oct-16 13:45 
Interesting article, I agree that it is more of an overview. Would love to see a step by step tutorial. This is valuable information!
GeneralMy vote of 3 Pin
Philip Shaffer18-Oct-16 9:48
MemberPhilip Shaffer18-Oct-16 9:48 
GeneralRe: My vote of 3 Pin
Member 1158571822-May-18 14:44
MemberMember 1158571822-May-18 14:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.