bug nuget 1.4 ? nuget spec does not include dependencies

Jun 20, 2011 at 9:16 AM

This is the packages.config in the project folder:

<?xml version="1.0" encoding="utf-8"?>
  <package id="structuremap" version="2.6.2" />
  <package id="Test.Data" version="1.0" />

When I run nuget spec, from the project directory, a nuget spec file gets created, but it does not contain dependencies... I can't remember for sure, but I thought nuget 1.3 added dependencies...
(according to the documentation http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package, it should add the dependencies...) 

Also tried nuget pack myproject.csproj (with or without an existing nuspec file), same thing, no dependencies.


Jun 20, 2011 at 5:01 PM

Does the nuspec file that gets created contain tokens (e.g. <id>$id$</id>)? Just to make sure you're getting a project-driven file and not a generic one.

Jun 20, 2011 at 6:15 PM

yes, they are all present... at first I even got an error because the description was not provided in the assemblyinfo.cs...

Jun 20, 2011 at 6:30 PM

ok, my mistake, I thought dependencies should be inside the nuspec file that was created by nuspec spec. The package created with nuget pack myproject.csproj does contain the dependency!!

Jun 20, 2011 at 7:01 PM

Ah yes, sorry, I should have mentioned that :) The general ideal is to follow DRY principles, such that if the list of dependencies changes, you don't need to mess with the nuspec file.

Note that you can add additional dependencies using the nuspec.