Currently, you can pack an entire graph of transitive dependencies along with your package by simply adding PrivateAssets=all on the PackageReference:
<ItemGroup>
<PackageReference Include="NuGetizer" Version="0.5.0" />
<PackageReference Include="Scriban" Version="3.0.4" PrivateAssets="all" />
</ItemGroup>
There is currently no way of stopping the transitivity, however. You'd have to manually add each dependency and set Pack=false on it to stop this behavior.
We should support a new PackTransitive=false attribute to opt-out of this behavior. I'd still keep the transitive packing on by default since that's the most common approach when doing private assets for a dependency (in my experience, i.e. tools or msbuild tasks).
Currently, you can pack an entire graph of transitive dependencies along with your package by simply adding
PrivateAssets=allon thePackageReference:There is currently no way of stopping the transitivity, however. You'd have to manually add each dependency and set
Pack=falseon it to stop this behavior.We should support a new
PackTransitive=falseattribute to opt-out of this behavior. I'd still keep the transitive packing on by default since that's the most common approach when doing private assets for a dependency (in my experience, i.e. tools or msbuild tasks).