Posted by Anuraj on Tuesday, April 19, 2016 Reading time :2 minutes
NuGet is a free and open-source package manager designed for the Microsoft development platform (formerly known as NuPack). Nuget is a great way to share packages in between teams. This post is about setting up your own nuget server for your company or team. This post is using Klondike, which is web application, instead of building my own using nuget.server package. Klondike is an asp.net web application you deploy to your own web server or to the cloud that works as a private NuGet package feed for storing private packages your organization creates. Klondike can also automatically restore packages sourced from 3rd party feeds, such as the nuget.org public feed, to keep your build server humming even when nuget.org is unavailable.
Please follow the steps to install Klondike in your local environment or azure. It is simple and straight forward.
You can publish a nuget package to the repository either using dropping the nuget package to the package directory (by default App_Data\Packages), and you need to Synchronize it using Admin menu or you can publish using the nuget.exe.
To publish a package using nuget you need to download the nuget.exe from nuget.org. The execute the following command.
You need to replace with your API key (you will get it from Admin > Manage Accounts > Accounts > Local Administrator screen) and URL.
Once you execute this command, message will be displayed like Your package was pushed. Now if you open your packages page, you will see the details of the package you pushed.
All the details displayed in the page is read from the nuspec file as part of the package.
To consume the nuget repository, you need to configure the URL in Nuget Package Sources, you can do it by Tools > Options > Open the Nuget Package Manager node. And select the Package sources option.
And you can search / browse the package using Manage Nuget Packages for solution option, which will display a screen like this.
You can also install it via Package Manager console, where you need to provide a command like this.
Happy Programming :)
What do you think? I would like to hear your thoughts, suggestions, and questions in the comments section below.