Reputation: 1103
Probelm
I want to set-up the no commit workflow for NuGet. But in order to do so, I need to make sure I have copies of any 3rd party packages and there dependencies installed from nuget.org copied to our private repo.
NuGet Mirror
I've looked into the NuGet mirror command, but this looks to be a manual process. https://docs.nuget.org/docs/reference/command-line-reference#Mirror_Command
NuGet Copy
I also looked into NuGet copy, but could A) not get it to work and B) it still looks like a manual process. https://www.nuget.org/packages/nuget.copy.extension/1.2.0
Is there any solutions to do this automatically upon package install? I can't force the developers to remember to manually copy the packages after they install them. When the developer installs a package, I want it to be copied over to our private NuGet repo. Please lead me in the right direction.
Upvotes: 5
Views: 1527
Reputation: 20312
I'm not aware of any built-in NuGet feature to do this, but here's a simple way to make sure all packages are synced to a shared repository.
NuGet saves all downloaded packages to C:\Users\username\AppData\Local\NuGet\Cache
Just install sync software like BitTorrent Sync on each developer PC and the shared repo server. BTSync will automatically synchronize any new packages to the shared repo as well as all other devs.
Upvotes: 3