Skip to content

[Bug]: No way to suppress very noisy "The project ... is using CentralPackageVersionManagement, a NuGet preview feature." #11724

Closed

Description

@AArnott

NuGet Product Used

dotnet.exe

Product Version

6.0.200

Worked before?

No response

Impact

It bothers me. A fix would be nice

Repro Steps & Context

Every single project gets a warning about using CPVM as a preview feature in the console log. This adds a lot of noise and it would be nice to be able to suppress it.

The project C:\git\VS-Platform\src\Editor\Text\Test\Unit\WpfView\WpfViewUnitTests.csproj is using CentralPackageVersionManagement, a NuGet preview feature.
Restored C:\git\VS-Platform\src\Editor\Text\Impl\InvisibleCharacterTagger\InvisibleCharacterTagger.csproj (in 387 ms).
The project C:\git\VS-Platform\src\Editor\Text\Impl\EditorPrimitives\EditorPrimitivesImpl.csproj is using CentralPackageVersionManagement, a NuGet preview feature.
Restored C:\git\VS-Platform\src\Editor\Text\Test\Unit\CurrentLineHighlighter\CurrentLineHighlighterTests.csproj (in 2.03 sec).

Verbose Logs

No response

Activity

  1. self-assigned this
    on Apr 7, 2022
  2. jeffkl commented on Apr 7, 2022

    @jeffkl
    Contributor
  3. nkolev92 commented on Apr 18, 2022

    @nkolev92
    Member

    Team Triage: This is currently noisy by design, because we want to make sure all customers are aware that they're using a preview feature.

  4. pensono commented on May 27, 2022

    @pensono

    Now that this feature has been made generally available, can this warning be removed?

  5. menees commented on Jun 3, 2022

    @menees

    I concur with @pensono. This feature is no longer in preview as of NuGet 6.2, VS 2022 17.2, and .NET SDK 6.0.300 per the Central Package Management (CPM) docs. There really needs to be a way to get rid of the "noisy by design" message now. It's not only bothersome; it's incorrect since it's no longer a preview feature.

    I'm running VS 17.2.3, and its Package Manager Console Host Version is 6.2.0.146. I still see this "preview" message frequently in my VS builds and in command line builds with MSBuild. Is there any way to suppress it?

  6. menees commented on Jun 15, 2022

    @menees

    Unfortunately, it seems that CPM is still in preview as far as the NuGet team is concerned even though the blog article announcing CPM didn't indicate that. The MSDN docs don't say "still in preview" either although there is a tiny note at the end of the docs that says, "This feature is in active development.". @JonDouglas also announced that CPM shipped in #6764, but then "clarified" to "landed in preview" in a later comment.

    Other people have pointed out that this state is very confusing (e.g., NuGet Docs #2770 and Introducing Central Package Management, comment 202. 🙁

    For anyone else that comes to this issue wanting the annoying using CentralPackageVersionManagement, a NuGet preview feature message removed, you'll need to monitor and wait for #11752. It's assigned to @jeffkl who posted the blog article announcing CPM availability. That epic lists this closed issue as one of its dependents. It's not checked off there, but it has a comment that says, "Fixed by not logging the message". Hopefully, that epic will be finished soon or some workaround provided.

  7. added a commit that references this issue on Jun 15, 2022
  8. menees commented on Jun 15, 2022

    @menees

    FWIW, I just published Menees VS Tools release 2022.0.4 with a default gray highlight rule for the "CPM preview" message. This way the annoying preview message is rendered as gray text rather than normal text in the VS Build Output window if you're using my free extension with its default settings. It's not as nice as getting rid of the message altogether, but it helps me to recognize it quicker as an ignorable detail line.

  9. menees commented on Aug 30, 2022

    @menees

    For anyone still interested, the preview message wasn't removed in VS 17.3 as part of epic #11752. However, there's a new issue (#11950) for it in the epic for VS 17.4 (#11952).

  10. betmix-matt commented on Nov 21, 2023

    @betmix-matt

    I'm still getting this warning using Dotnet SDK 6.0.417-1

    If this was fixed last year, why is it still appearing?

  11. nkolev92 commented on Nov 21, 2023

    @nkolev92
    Member

    It was removed in NuGet 6.4, #11950, which matches 7.0.100, https://learn.microsoft.com/en-us/nuget/release-notes/nuget-6.4.

  12. betmix-matt commented on Nov 21, 2023

    @betmix-matt

    Is there any chance they'll ever get a .NET 6 with NuGet 6.5? I only ask as my monorepo is tied to always support .NET 6 because of some old Windows devices. If this is going to forever persist for .NET 6 LTS I might consider sticking with the old central package management standard :-/. A forever spammed warning message that all my devs see every single time they build for the foreseeable future really stinks.

  13. AArnott commented on Nov 21, 2023

    @AArnott
    ContributorAuthor

    @betmix-matt, It sounds like maybe you need to target .NET 6, but that's a different thing than needing to use the .NET 6 SDK. You could use the .NET 7 or 8 SDK to be rid of this warning while still targeting .NET 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions