Reputation: 51709
We're building a set of several services, each service has it's own solution with associated projects. Many of these services rely on the same NuGet packages.
All the solutions have "Package Restore" enabled.
Some of the solutions refer to assemblies owned by other solutions, this is one obvious reason why we need all the solutions to refer to exactly the same versions of different NuGet Packages.
All of the services need to work together to achieve an end result. They're packaged and installed as part of a single product, which is another reason we'd like everything to be running off the same versions of the NuGet Packages
We're having trouble keeping package versions consistent between Solutions.
Currently we're manually checking and updating package versions, we're also getting occasional compilation errors because projects in one solution end up referring to different versions of the same package.
Is there a recommended way of doing this (hopefully an automatic process)?
Would we be better off without Package Restore?
Anyone have any general advice on the subject?
Thanks
Update: I created an issue for this on the NugGet project http://nuget.codeplex.com/workitem/2623
Upvotes: 14
Views: 2215
Reputation: 18069
You could configure your TFS builds to update all NuGet packages in the solution to their latest versions using the nuget update
command.
The latest versions could be from nuget.org, a local NuGet server or even a network share. Use the source
parameter to define the sources you want to update from.
You can perform the build configuration via MsBuild proj files or via a TFS template.
Upvotes: 0
Reputation: 14376
To solve this:
Although this requires a server, it not only ensures everyone has the correct version but speeds up the downloads for build servers as well.
Upvotes: 5