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.
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).
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).
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).
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)
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.
6. Let`s click on “here” to see the 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).
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).
In this article, we learn about how to create a remote NuGet feed. I hope you enjoyed reading the article.
Great thanks for Sharing.
Thank you for your feedback Amit