Automatically pack dependencies into multiple target frameworks?

I went through an exercise recently of trying to have a class library produce a NuGet package for both net40 and net45. Using the "nuget pack" command I could not figure out a way to get the dependencies automatically added to the package under
the respective target frameworks. Is it possible without a .nuspec file?

I found a shortcoming with the "nuget pack" command. When attempting to construct a NuGet package from a .csproj file, it attempts to add dependencies for each target framework; I kept seeing the message "An item with the same key has already
been added."

The command is being executed as a Target within the .csproj file. Here are the relevant elements:

Before targeting multiple frameworks, the command worked correctly and used packages.config to add the dependencies. It seems like the bug exists when adding dependencies for multiple frameworks. Instead of failing when a dependency already exists, just skip
over it.