Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Nuget on an intranet

Tags:

nuget

I think NuGet is a great idea for dependency management. I would like to try using it for my team to manage dependencies. The problem is that we are on an intranet and not connected to the internet.

Ideally, I would like to be able to mirror the official NuGet feed locally and supplement that with a local feed of packages that we provide internally.

Can anyone provide guidance on how to do this?

like image 598
Jeffrey Cameron Avatar asked Sep 28 '11 11:09

Jeffrey Cameron


1 Answers

We have setup a local intranet feed for our own packages using: http://haacked.com/archive/2011/03/31/hosting-simple-nuget-package-feed.aspx

Our teamcity is building the packages in special builds and pushing those to our internal feed. That blogpost says internal but it is in its current version also writeable.

Make sure to check David Ebbo posts: http://blog.davidebbo.com/search/label/NuGet

Especially: the dated: http://blog.davidebbo.com/2011/08/easy-way-to-set-up-nuget-to-restore.html

Those will for example have you setup a build event which will make your projects on build download the referenced packages if they are missing (so you don't have to commit the packages to your sourcecontrol!). You will have to change a line in: .nuget\NuGet.targets to get package first from your local source and use the default nuget as secondary:

<PackageSources>"http://[localserver]/nuget/nuget/;https://go.microsoft.com/fwlink/?LinkID=206669"</PackageSources>
like image 147
Henk J Meulekamp Avatar answered Sep 25 '22 20:09

Henk J Meulekamp