Exclude NuGet Package Dependency From NuGet Package

I have been using the Create New NuGet Package utility for auto-generating NuGet packages for some time. You add this as a NuGet package to your project and It Just Works(TM). It uses your assembly information to generate the metadata so you don’t even need a nuspec file.

The one thing you will want to ensure is that the “Create New…” package itself is not bundled into the NuGet package you create… otherwise you’ll be turning all your consumers into NuGet packages in some kind of strange copy-left packaging cascade.

To prevent this, you just need to add the development dependency attribute in your packages.config file:

<?xml version="1.0" encoding="utf-8"?>