Exclude dependency from packages.config

Topics: General
Jul 5, 2012 at 6:31 PM

If I put a nuspec for my project adjacent to my csproj and packages.config, nuget pack will automatically find dependencies in packages.config and include them in the generated nuspec.

This seems reasonable in many cases, but I have a situation where my project uses a package at build time, but doesn't depend on it at runtime.

Is there a way to control which dependencies are automatically added during a pack operation?

Has this issue already been discussed?

If a solution is proposed I'm willing to write the code.