-
Notifications
You must be signed in to change notification settings - Fork 262
Description
NuGet Product Used
dotnet.exe
Product Version
10.0.100-preview.6.25358.103
Worked before?
Not sure
Impact
It bothers me. A fix would be nice
Repro Steps & Context
Ref: NuGet/docs.microsoft.com-nuget#3444 (comment)
dotnet package add System.Memory@4.6.3
shows info level white text for NU1510 warning.
But when doing dotnet build
a NU1510 warning with yellow text is printed
➜ dotnet new console
...
➜ dotnet package add System.Memory@4.6.3Build succeeded in 0,5s
info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
info : Adding PackageReference for package 'System.Memory' into project 'C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj'.
warn : NU1510: PackageReference System.Memory will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.
info : Restoring packages for C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj...
info : GET https://api.nuget.org/v3/vulnerabilities/index.json
info : OK https://api.nuget.org/v3/vulnerabilities/index.json 30ms
info : GET https://api.nuget.org/v3-vulnerabilities/2025.07.22.23.30.53/vulnerability.base.json
info : GET https://api.nuget.org/v3-vulnerabilities/2025.07.22.23.30.53/2025.07.23.17.30.54/vulnerability.update.json
info : OK https://api.nuget.org/v3-vulnerabilities/2025.07.22.23.30.53/vulnerability.base.json 39ms
info : OK https://api.nuget.org/v3-vulnerabilities/2025.07.22.23.30.53/2025.07.23.17.30.54/vulnerability.update.json 48ms
info : Package 'System.Memory' is compatible with all the specified frameworks in project 'C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj'.
info : PackageReference for package 'System.Memory' version '4.6.3' added to file 'C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj'.
info : Writing assets file to disk. Path: C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\obj\project.assets.json
log : Restored C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj (in 476 ms).

➜ dotnet build
Restore succeeded with 1 warning(s) in 0,5s
C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj : warning NU1510: PackageReference System.Memory will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
PackageAddNU150AsInfoNotWarning succeeded with 1 warning(s) (2,0s) → bin\Debug\net10.0\PackageAddNU150AsInfoNotWarning.dll
C:\repos\repros\nuget-home\PackageAddNU150AsInfoNotWarning\PackageAddNU150AsInfoNotWarning.csproj : warning NU1510: PackageReference System.Memory will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.Build succeeded with 2 warning(s) in 2,9s
cc @nkolev92
Verbose Logs
The command `dotnet package add System.Memory@4.6.3` doesn't support `--verbosity diag`
>Unrecognized command or argument '--verbosity'.
Unrecognized command or argument 'diag'.
Maybe fixed in #49635? Atleast `dotnet package remove` when not specifying a project got fixed in that PR even if it's mainly targeted at file-based programs.