NuGet Pack Omitting Dependencies

Topics: General
Jun 15, 2014 at 2:54 AM
I'm the author of the SpecsFor nuget package. SpecsFor depends on several other packages, two of which are Moq and structuremap.automocking.moq. SpecsFor requires Moq 4.2.1402.2112 or greater. Structuremap.automocking.moq is built against an older version (4.0 something). For some reason, the SpecsFor nuget package is being generated without any reference to Moq, which causes things not to work when SpecsFor is installed.

So, when I run 'nuget pack' on the .csproj file for SpecsFor, I think it is seeing that structuremap.automocking.moq references moq, and therefore it isn't adding moq as a direct dependency of SpecsFor, even though it very much is!

For now, I'm stuck with manually editing the .nuspec file, but that's hugely inconvenient. Is there some other way I can make sure that the pack command will correctly infer SpecsFor's dependencies?