This project is read-only.

Versioning of Dependend Packages

Mar 22, 2013 at 9:45 AM
Hi!

First of all, thank you for this project! It saved me a lot of work! :)

We build a "Core" that is used by a number of projects. We use NuGetter to arrange multiple packages out of this solution. However some of the packages depend on other packages in the core:

So we have such a structure:
  • Common
  • Helper
  • SystemModule
We build 3 different packages:
  • Core.Common
  • Core.Helper
  • Core.SystemModule
The nuget package specs are like this:
  • Core.Common
  • No Dependencies
-Core.Helper
  • Depends on Core.Common ("2.0.0.0")
-Core.SystemModule
  • Depends on Core.Helper ("2.0.0.0")
However building of the packages work, but if i update the package Core.SystemModule in another solution (speeking from 2.0.0 to 2.0.1) the references to Helper and Common are not updated. I guess this happens cause the dependency gets not updates cause of the "2.0.0.0" part in the dependency part in the spec files.

So my question is, is there a way to update the dependency version of some packages? (or use variables in the spec files?)

Thanks, Manuel.
Oct 9, 2013 at 11:25 PM
I've got the same exact scenario. Did you find a solution to this? I'm thinking I'd have to write some custom powershell script to update all the .nuspec files so all the dependency versions are correct. I can see this getting very messy however.
Oct 10, 2013 at 9:31 AM
Hi Mobes!
Nope, had to control everything from the nuget client.
Put all your Core packages in a seperate drop location.
Setup the new drop location in the packages repository:
%appdata%\NuGet\NuGet.Config
run nuget shell
Update-Package -Source \\yourpackages\drop -IgnoreDependencies
-IgnoreDependencies speeds up your update

for the build dependencies:
use regular dependency numbers based on the major and minor
Core.Helper
Depends on Core.Common (">2.0")
So you only have to specify the dependencies if you upgrade from 2.0 to 2.1.


Another solution is to let nuget make the trick its own:
Write a build script (.proj) that builds the projects.
Put a nuspec in each directory where a csproj file is.

Build with versioning (cause this happens before the build script executes)
nuget pack your package file (within the proj file), it will automatically check for project dependencies and add it to the dependency list.

i think it was a bad idea to let tfs manage the packaging, it lead our team to a lot of confusion with multiple branches.
Use semver with alpha and beta for stabilisation, in the release branch switch to the stable version. Start from there on with a new minor or major version tagged as alpha.

Hope that helps :)
Greetings, Manuel