One of the later versions of Visual Studio started showing vulnerability messages.
I looked at the issue – high CPU in certain cases. It doesn’t affect my use case.
How do I get Visual Studio to stop showing me this warning? I’ve tried adding the code into the portion in the csproj, but it persists.
2
Answers
Add the following code to the .csproj file to make the entire project ignore the NU1902 warning:
@stuartd’s suggestion in comment worked for me (it was only missing nuget restore):
NoWarn="NU1901"
in your PackageReference:nuget restore
(<– this step is mandatory otherwise I still had the issue)I’ve also tested:
as stated in this doc: https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages#excluding-advisories
but it did not work.