Why does NuGetPack respond with "Cannot create a package that has no dependencies nor content"

Turns out, this was an error with the directory paths that I was using. I was trying to use .build\_temp\_PublishedLibraries\Cake.Twitter.

Changing .build to BuildArtifacts immediately made everything work:

enter image description here

After doing a little bit of digging, this seems to be a known issue with NuGet (well at least known to some):

https://twitter.com/ferventcoder/status/505048107520765952

i.e. Any file or folder that start with a . are not recognised by nuget pack.

Seemingly this issue has been corrected in Chocolatey, and as a result, it works there.

NOTE: I have raised this as an issue here: https://github.com/NuGet/Home/issues/3308


This error can also be seen if you simply specify a bad path/spec in the <file src attribute and NuGet gathers no files.