If you publish a CSPROJ that has a PackageReference to i.e. the Microsoft.Extensions.DependencyInjection
NuGet package, then you will also get the DLLs for Microsoft.Extensions.DependencyInjection.Abstractions
because the referenced package has a dependency on it. You will also get DLLs that .Abstraction
depends on, and so on and on and on.
Is there a way to mark this PackageReference so that only its own DLLs are published and dependencies are ignored? Or in other words: How could one reference Microsoft.Extensions.DepencyInjection
so that a publish only publishes Microsoft.Extensions.DepencyInjection.dll
without any dependent DLLs?