The current Pack targets don't seem to have a way to specify developmentDependency for the generated NuSpec. This leaves a gap when creating packages intended to be used at build-time only.
Set PrivateAssets=all in the PackageReference 
Not what I'm talking about -- I'm talking about creating a library/package that has developmentDependency set to true in its metadata.
That other issue is about consuming PackageRefs and turning those into dependencies or not.
Oh I see, to write this into the nuspec for a new package :smile:
That doesn't exist currently since the developmentDependency flag is not supported for PackageReference yet, this would be good to fix along with #4125
//cc @rohit21agrawal
This is only useful if we do https://github.com/NuGet/Home/issues/4125 (which we should)
@davidfowl I agree we should fix #4125, but fixing _this_ is absolutely useful even without that. I can't build packages that are consumed downlevel without this feature. I'm trying to migrate my nerdbank.gitversioning package over to your new pack targets and I am blocked because if I start releasing packages that are missing this metadata, everyone using packages.config will regress when they use my latest package.
In trying to workaround the problem by using the $(NuspecFile) property as a template, I find I can specify <developmentDependency>true</developmentDependency> but then the files being packaged go to heck. Either I specify <files /> section and get an error about no content, or remove that section and I get the whole project directory instead of the binaries and dependencies all nicely laid out as I had (highly customized) before.
+1 to @AArnott's comments. We lose a lot of MSBuild magic by "dropping down" to nuspec. Using <NuspecProperties> helps a bit, but we still end up re-implementing (i.e. hard-coding) a lot of it.
This needs to be reopened... this doesn't actually work in either 4.3 or the 2.0 preview 1 tooling... the MSBuild.Build.Tasks.Pack.Targets don't have any mention of DevelopmentDependency in them.
your nuget.build.tasks.pack.dll version please?
In the tools preview 1 SDK, it's 4.3.0.2418
Most helpful comment
Oh I see, to write this into the nuspec for a new package :smile:
That doesn't exist currently since the developmentDependency flag is not supported for PackageReference yet, this would be good to fix along with #4125
//cc @rohit21agrawal