NuGet Product Used
dotnet.exe
Product Version
.NET SDK 10.0.102
Worked before?
No response
Impact
It bothers me. A fix would be nice
Repro Steps & Context
If the Microsoft.AspNetCore.App framework is not referenced by the application itself, but pulled in by a referenced library, package pruning does not seem to work.
I created a repro here: https://github.com/mus65/nuget-packagepruning-issue
To repro:
dotnet build
dotnet nuget why app/app.csproj Microsoft.AspNetCore.Authentication
This will say that Microsoft.AspNetCore.Authentication is pulled in by CoreWCF.Http, but it should be pruned instead.
Workaround: use Microsoft.NET.Sdk.Web in application or add framework reference Microsoft.AspNetCore.App to application.
Verbose Logs
NuGet Product Used
dotnet.exe
Product Version
.NET SDK 10.0.102
Worked before?
No response
Impact
It bothers me. A fix would be nice
Repro Steps & Context
If the Microsoft.AspNetCore.App framework is not referenced by the application itself, but pulled in by a referenced library, package pruning does not seem to work.
I created a repro here: https://github.com/mus65/nuget-packagepruning-issue
To repro:
This will say that Microsoft.AspNetCore.Authentication is pulled in by CoreWCF.Http, but it should be pruned instead.
Workaround: use Microsoft.NET.Sdk.Web in application or add framework reference Microsoft.AspNetCore.App to application.
Verbose Logs