Is it possible to automating package builds with depencencies?

Oct 21, 2011 at 5:32 PM

Myself and a couple of the kind folks who help contribute to SNAP NuGet project are looking to automate the package creation process.  I've got a batch file that will build the core project file using -Version command line parameter, and that works well.  The rest of my nuspec files have a dependency on the core project.  I'm looking for a way to update each spec file that depends on the core project so I don't have to manually edit the dependency version number each time we release a new version.

In other words, if the core project is at version 1.0 and we build the next release, version 1.1, we then package and publish the core project v1.1 to  Now, I'm hoping to package all the projects that depend on the core, but with the new v1.1.  Each spec file currently references the previous version number (version 1.0 in this example).  I'm looking for some command line parameter or super awesome convention that'll allow the dependent spec files to always build with a reference to the published version of the core project.

Even more awesome is if I could do this all in one step without having to publish the core project before packaging the other specs.

Thanks for the assistance.

Oct 21, 2011 at 5:40 PM

There is no command line for this today. The closest thing is the workflow where you use 'nuget pack' on a csproj file. In that case, is the project has dependencies on other packages, those will automatically make their way into the nuspec file.

Oct 21, 2011 at 7:34 PM
Take a look at this:

That dependency for RoundhousE is automatically updated when building the nuget package. Here's what does it:

The build tool being used is UppercuT (a conventional build) and it this is a custom extension hooking into the nugetPrepare build step. Extensions can be written in Nant, Ruby, or PowerShell (