{"id":7,"date":"2013-03-13T21:13:17","date_gmt":"2013-03-13T20:13:17","guid":{"rendered":"http:\/\/www.vosseburcht.com\/?p=7"},"modified":"2016-02-08T20:37:44","modified_gmt":"2016-02-08T20:37:44","slug":"your-own-private-nuget-gallery","status":"publish","type":"post","link":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/2013\/03\/13\/your-own-private-nuget-gallery\/","title":{"rendered":"Your own private NuGet gallery"},"content":{"rendered":"<p>You probably know <a title=\"NuGet\" href=\"http:\/\/nuget.org\/\" target=\"_blank\">NuGet<\/a>\u00a0(and if you don&#8217;t, just click that link). And, if you write a lot of the same types of projects, you probably have a few libraries you\u00a0reuse\u00a0in those projects. Wouldn&#8217;t it be nice if you could install those libraries just as you install JQuery, Entity Framework or &#8216;your favorite package here&#8217;, but just not share that package with the entire world.<\/p>\n<p>As always, there are plenty of ways to achieve this. Each has its pros and cons, and I decided to do a write-up of what is possible. So, first the options:<\/p>\n<ul>\n<li>Simple file share containing packages<\/li>\n<li>Automatically synchronized (cloud)\u00a0file share containing packages<\/li>\n<li>Internal nuget server<\/li>\n<li>NaaS &#8211; NuGet as a Service<\/li>\n<\/ul>\n<p>So now that we have the options, lets see what they are all about.<\/p>\n<h4>Simple file share containing packages<\/h4>\n<p>When you open the NuGet settings you will be able to add your own package source. This does not have to be a URL per se, but can also be a file location on a network drive or your own machine:<\/p>\n<p><a href=\"http:\/\/techblogmedia.blob.core.windows.net\/default\/2013\/03\/Package-source-settings.png\" rel=\"attachment wp-att-8\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-8\" src=\"http:\/\/techblogmedia.blob.core.windows.net\/default\/2013\/03\/Package-source-settings.png\" alt=\"Package source settings\" width=\"758\" height=\"441\" srcset=\"https:\/\/techblogmedia.blob.core.windows.net\/default\/2013\/03\/Package-source-settings.png 758w, https:\/\/techblogmedia.blob.core.windows.net\/default\/2013\/03\/Package-source-settings-300x175.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/p>\n<p>Pros:<\/p>\n<ul>\n<li>Easiest to setup.<\/li>\n<li>When using\u00a0a file share on a network drive, accessible for all users inside your network.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Not easily available outside your company network.<\/li>\n<\/ul>\n<h4>Automatically synchronized (cloud)\u00a0file share containing packages<\/h4>\n<p>The same as above, but now you use <a title=\"Skydrive\" href=\"https:\/\/skydrive.live.com\/\" target=\"_blank\">Skydrive<\/a>, <a title=\"Dropbox\" href=\"https:\/\/www.dropbox.com\/\" target=\"_blank\">Dropbox<\/a>, or any other cloud storage provider to synchronize that folder in the cloud for easy access when working from home or plane.<\/p>\n<p>Pros:<\/p>\n<ul>\n<li>Still easy to set up (on your clients at least).<\/li>\n<li>Package source always with you, and automatically syncs when you are online.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Setting up access rights to more people than a small team (4 or 5 people) is going to be a maintenance nightmare.<\/li>\n<li>Try explaining a Dropbox or Skydrive installation on your build server to Corporate IT.<\/li>\n<\/ul>\n<h4>Internal NuGet server<\/h4>\n<p>In this scenario you setup your own NuGet server, which will probably consist of a website and some web services hosted on IIS (I am not sure if there are any non .NET NuGet servers out there). There are a few options with a varying degree of features and installation effort needed.<\/p>\n<ul>\n<li><a title=\"NuGet.Server\" href=\"http:\/\/www.nuget.org\/packages\/NuGet.Server\" target=\"_blank\">NuGet.Server<\/a>\u00a0&#8211; Quiet easy to install (will probably explain in a future post) if you know a bit of IIS, but limited functionality.<\/li>\n<li><a title=\"Official NuGet Gallery Website and Services\" href=\"http:\/\/docs.nuget.org\/docs\/contribute\/setting-up-a-local-gallery\" target=\"_blank\">Official NuGet Gallery Website and Services<\/a>\u00a0&#8211; A bit harder to install, you also need a SQL database.<\/li>\n<\/ul>\n<p>Pros:<\/p>\n<ul>\n<li>Once installed, easy to expose to outside the local network so you can access it from anywhere.<\/li>\n<li>Works just like the official NuGet Package Source, which means that you don&#8217;t need separate build scripts for packages you want to push to the official source and the internal source.<\/li>\n<li>Easily incorporated in automatic build scenarios.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Hard(er) to set up.<\/li>\n<\/ul>\n<h4>NuGet as a Service<\/h4>\n<p>I recently found <a title=\"MyGet\" href=\"http:\/\/www.myget.org\" target=\"_blank\">MyGet<\/a>, which hosts NuGet feeds. The idea is quite simple you register with them, a feed is created for you, and you can contribute to this feed. They have 4 different plans of which only 1 is free. More details on those plans <a title=\"MyGet Plans\" href=\"http:\/\/www.myget.org\/plans\" target=\"_blank\">here<\/a>.<\/p>\n<p>Pros:<\/p>\n<ul>\n<li>Easy to set up.<\/li>\n<li>The enterprise plan has a lot of nice options.<\/li>\n<li>Easily incorporated in automatic build scenarios.<\/li>\n<li>Available wherever you have an internet connection.<\/li>\n<\/ul>\n<p>Cons:<\/p>\n<ul>\n<li>Advanced and user\/quota management\u00a0features come at a price.<\/li>\n<\/ul>\n<h4>Conclusion<\/h4>\n<p>As you can see, there are plenty of options to create your own NuGet feed. I have chosen to install my own NuGet server (because\u00a0I only found out about MyGet after I finished, and I love to get my hands dirty\u00a0with that kind of stuff). So I&#8217;ll probably write a tutorial on that one some day.<\/p>\n<p>If you need\/want a private NuGet package feed is totally up to you. But if you do, there are plenty of options to get you started. And I hope this post has helped you make a decision.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You probably know NuGet\u00a0(and if you don&#8217;t, just click that link). And, if you write a lot of the same types of projects, you probably have a few libraries you\u00a0reuse\u00a0in those projects. Wouldn&#8217;t it be nice if you could install those libraries just as you install JQuery, Entity Framework or &#8216;your favorite package here&#8217;, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[16],"_links":{"self":[{"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/7"}],"collection":[{"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":2,"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/7\/revisions\/174"}],"wp:attachment":[{"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vosseburchttechblog.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}