Skip to content

Update NU1901-1904 #3446

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

Merged
merged 5 commits into from
Jul 21, 2025
Merged

Update NU1901-1904 #3446

merged 5 commits into from
Jul 21, 2025

Conversation

nkolev92
Copy link
Member

Fixes: NuGet/Home#14422

The new default is tied to .NET 10 tfm being one of the targeted frameworks.

@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 17:39
@nkolev92 nkolev92 requested review from a team as code owners July 18, 2025 17:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the NuGet documentation for NU1901 error to reflect changes in default audit mode behavior for .NET 10. The update clarifies that the default NuGetAuditMode setting changes to all when targeting .NET 10 framework, replacing the previous .NET 9 default behavior.

  • Updates the default NuGetAuditMode behavior documentation for .NET 10 targeting
  • Revises the reversion instructions to reference .NET 9's default instead of .NET 8
  • Updates the SdkAnalysisLevel version reference from 8.0.400 to 9.0.300

Copy link

Learn Build status updates of commit f059159:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1901-NU1904.md ✅Succeeded View

For more details, please refer to the build report.

@nkolev92 nkolev92 changed the title Update NU1901 Update NU1901-1904 Jul 18, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nkolev92 nkolev92 requested a review from zivkan July 18, 2025 17:43
Copy link

Learn Build status updates of commit bf7ee86:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1901-NU1904.md ✅Succeeded View

For more details, please refer to the build report.

Copy link

Learn Build status updates of commit 01844ad:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1901-NU1904.md ✅Succeeded View

For more details, please refer to the build report.

@nkolev92 nkolev92 merged commit 7fe2c43 into main Jul 21, 2025
2 checks passed
@nkolev92 nkolev92 deleted the dev-nkolev92-updatenu1901 branch July 21, 2025 18:37
The value can be explicitly set to `direct` to revert back to .NET 8's default. Alternatively, [the property `SdkAnalysisLevel`](/dotnet/core/project-sdk/msbuild-props#sdkanalysislevel) can be set to `8.0.400` to temporarily disable all new warnings and errors introduced in newer versions of the SDK. Specifically in this case, the default value of `NuGetAuditMode` is changed back to `direct`.
For projects targeting the .NET 10 framework, the default setting for `NuGetAuditMode` is `all`.
This means that NuGet will report on transitive packages with known vulnerabilities for all frameworks in the project.
The value can be explicitly set to `direct` to revert back to .NET 9's default.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default for .NET 9 isn't mentioned anywhere any longer which makes this statement a bit less clear than it could be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NU1901-NU1904 is incorrectly talking about NuGetAuditMode=all being set in .NET 9
3 participants