-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
nuget audit warnings report and counted twice #45367
Comments
@zivkan @Nigusu-Allehu should we route folks to report these in the nuget repo? |
I was able to reproduce this issue for |
@marcpopMSFT I think our teams need a quick sync on how we can solve this problem. So, it doesn't really matter to me which repo it's in. NuGet logs one of the messages, an MSBuild task living in the sdk repo logs the second message. When a customer runs Otherwise, perhaps an option is to change The design of SDK style projects in Visual Studio is that NuGet does not log to VS's Error List, it instead writes the messages to the assets file, the SDK task replays the messages when the project system does a design time build, and the project system adds the messages to the error list. In other words, we can't stop ResolvePackageAssets from replaying the messages, it's a core part of the design of how it's designed in Visual Studio. There might be other ways to implement a fix that I can't think of, so ideas from other people would be nice. |
So basically the restore is throwing the warning as is the build (from reading the assets file)? @dsplaisted in case you have any ideas or if this should be a partner sync topic. |
Maybe the ideal thing would be to stop producing these errors and warnings from |
Is it possible to check the error code and source code location to avoid duplicate warning/error? That may also benefit other cases not only the nuget audit case here. |
Describe the bug
nuget audit warning reports and counted twice
To Reproduce
Reproduce sample project: https://github.com/WeihanLi/SamplesInPractice/tree/main/NuGetSamples
Just run
dotnet build
Exceptions (if any)
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: