Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AArnott opened this issue Apr 7, 2022 · 11 comments

Comments

@AArnott
Copy link
Contributor

AArnott commented Apr 7, 2022

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

@jeffkl
Copy link
Contributor

jeffkl commented Apr 7, 2022

Linking to NuGet/NuGet.Client#3376 and #9340

@nkolev92 nkolev92 added the Resolution:ByDesign This issue appears to be ByDesign label Apr 18, 2022
@nkolev92
Copy link
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.

@pensono
Copy link

pensono commented May 27, 2022

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

@menees
Copy link

menees commented Jun 3, 2022

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?

@menees
Copy link

menees commented Jun 15, 2022

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.

menees added a commit to menees/VsTools that referenced this issue Jun 15, 2022
Commit 3f4aeb0 switched from MainPackage.GeneralOptions to .HighlightOptions, but I missed two places where the .GeneralOptions.Applied event was used. That meant changing .HighlightOptions properties wouldn't cause text to be reclassified (i.e., re-highlighted) without a restart.

Also, added default gray highlight rule for "CPM preview" message that's discussed at NuGet/Home#11724. This way the annoying preview message is rendered as gray text rather than normal text.
@menees
Copy link

menees commented Jun 15, 2022

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.

@menees
Copy link

menees commented Aug 30, 2022

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).

@betmix-matt
Copy link

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

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

@nkolev92
Copy link
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.

@betmix-matt
Copy link

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.

@AArnott
Copy link
Contributor Author

AArnott commented Nov 21, 2023

@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
Projects
None yet
Development

No branches or pull requests

7 participants