Internal (private) NuGet servers

By | July 19, 2013

I just posted this to my blog at work but thought I’d also pass it along to my .Netitude readers. Hope you find it useful!

If you’re familiar with NuGet you know the benefits it provides .Net developers in consuming packages created by 3rd parties. Well, what if you want to treat somebody internal to your organization as a 3rd party, and don’t want the whole outside world to see the packages you put together for them?

You have a couple of options:

  1. Sign up for a service like myget.org which will host a private NuGet feed for you to which you can upload packages and control access (even at an Enterprise level if you want to pay for it)
  2. Create your own “server” using the instructions below

Obviously I’m going to outline #2.

I put server in quotes because it’s insanely easy to do this and isn’t even really a server.

I have set up my own NuGet server internally, you can use it in VS by setting up the following:

image

Notice the ‘source’ – it’s just a network share.

When you set this up you’ll get the following in your “Manage NuGet packages…” dialog:

image

image

You can hit ‘Install’ and get a .cs file that has an extension class in it. Useless as it may be to you at this point. :)

Enjoy!

  • The simple nuget.server has no indexed storage and as such is not really a server, like you say. Definitely not suitable for an Enterprise environment. For a full overview of the nuget ecosystem, check this article http://www.codeproject.com/Reference/628210/An-Overview-of-the-NuGet-Ecosystem.

    • Brandon

      Thanks for the reply to this post with that awesomely useful link! Wish that’d have been around before I wrote the post and tried researching nuGet server/share setups, but I’ll definitely see what I can make use of there!

      • You’re welcome! Good thing you’re looking into using NuGet at your company!

    • Xavier, you’ll be happy to know that since writing this article I’ve used the nuGet Server doco and its associated nuget dependencies to deploy *real* servers to Azure and use them.
      Feels much better :) Thanks again.

      • Nice :-) did you investigate MyGet as an option? would be interested in your feedback!

        • I did… I was excited at the prospect of deploying to Azure but found the hosting was only available in European datacenters. This is unacceptable for me, unfortunately.

          • Did you know that’s no longer the case? MyGet now also hosts from US datacenters.

          • I know they _can_ host from US DataCenters but only if you go thru them, not thru Azure, and only for enterprises that jump through all the sales hoops, etc. I have been in contact w/ MyGet regarding this as I wanted to use their Azure offering at my company, but there’s no way we’d host our assemblies overseas.
            looks like it’s still the case for the Azure offering: http://screencast.com/t/GOKM7MTK04D

  • Pingback: Create your own hosted NuGet server in Azure | .Netitude | .Net development with an edge()