In my previous post, we discussed 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.
- To get started, open visual studio and select File, New, then Project option which will open up a new Project dialog box as shown below:
Figure 1: New Project Dialog box In Visual Studio 2013
Select ASP.NET Web Application Project option, enter the name of the project as RemoteNugetFeed and then click on OK button.
- After clicking on OK button, Project Template window will pop up as in the following screenshot:
Figure 2: Project Template Dialog box
Select the Empty option and click on OK button. After clicking on OK button, empty ASP.NET web application will get created.
- 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 in the following:
Figure 3: Install NuGet.Server package
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.
- 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 in the following:
Figure 4: Add Packages To Package Folder
- Now let`s run the application. After running the application, we will get a page as in the following that contain some instruction on what to do next:
Figure 5: Remote NuGet Feed Website
- Let`s click on “here" to see the OData over ATOM feed of packages:
Figure 6: OData over ATOM feed of packages
- Now we are all set to deploy this website as any other website. I have deployed this application here. To add our remote feed as a package source in Visual Studio, go to Tools, then Option menu. It will open up a window and search for package source. Then click on plus icon to add package source as in the following (I have given the new package source name as RemoteFeed):
Figure 7: Add Remote Feed As A Package Source In Visual Studio
Note: Here's the URL for package source is. After adding our new remote feed as a package source, we can now install the packages from our remote feed in any project:
Figure 8: Remote NuGet Feed
In this article, we learned about how to create a remote NuGet feed. I hope you enjoyed reading the article.