How To Create Remote NuGet Feed

NuGet

5.00 ( 1 votes) | 1253

In my previous post, we talked about How to create a NuGet Package. In this article, we will talk about how to create a remote feed for NuGet packages. So let`s get started.

Steps:

1. To get started, open visual studio and select File => New => Project option which will open up a New Project dialog box as shown below (F:1).

New Project Dialog box In Visual Studio 2013 (F: 1)

Select ASP.NET Web Application Project option, enter the name of the project as RemoteNugetFeed and then click on OK button.

2. After clicking on OK button, Project Template window will popup as shown below (F:2).

Project Template Dialog box (F: 2)

Select the Empty option and click on OK button.  After clicking on OK button, empty ASP.NET web application will be created.

3. Once the project is fully loaded in visual studio, click on References and select Manage NuGet Packages option. It will open up Package Manager Window. Select the Online tab and search for NuGet.Server package as shown below (F: 3).

Install NuGet.Server package (F: 3)

Click on the Install button to install the package. NuGet.Server package will convert our empty website into a site that is ready to serve the OData package feed.

4. Now we just need to add our package to the Packages folder in our project. I have added my package to the Packages folder as shown below (F: 4). (Click here to get more information on How to Create a NuGet Package)

Add Packages To Package Folder (F: 4)5. Now let`s run the application. After running the application, we will get a page as shown below (F: 5) which contain some instruction on what to do next.

Remote NuGet Feed Website (F: 5)6. Let`s click on “here” to see the OData over ATOM feed of packages (F: 6).

OData over ATOM feed of packages (F: 6)7. Now we are all set to deploy this website as any other website. I have deployed this application on here.  To add our remote feed as a package source in visual studio, go to Tools => Option menu. It will open up a window and search for package source. Then click on plus icon to add package source as shown below (F: 7) (I have given the new package source name as RemoteFeed).

Add Remote Feed As A Package Source In Visual Studio (F: 7)

Note that URL for package source is http://nugetserver.dotnetcontext.info/nuget.  After adding our new remote feed as a package source, we can now install the packages from our remote feed in any project (F: 8).

Remote NuGet Feed (F: 8)

Conclusion:

In this article, we learn about how to create a remote NuGet feed.  I hope you enjoyed reading the article.

Happy Coding!!!!!!

Manoj Kulkarni - Dotnetcontext

Manoj Kulkarni

I am programmer, passionate blogger and foodie. I live in Nashik. I am a .Net developer. I like to learn new technologies to keep my self-updated and share that knowledge with my blog readers, friends and colleague.

2 Comments


Amit L - Dotnetcontext

Amit LFriday, November 27, 2015 2:54 AM

Great thanks for Sharing.

Manoj Kulkarni - Dotnetcontext

Manoj KulkarniTuesday, December 1, 2015 2:23 PM

Thank you for your feedback Amit

Add a new comment