Safeguard
Developer Tools•

Does NuGet audit work on old packages.config projects?

Yes, since NuGet 6.10, but with limits: no audit mode setting and fewer MSBuild controls. A version table and what to do if you cannot migrate yet.

Safeguard Security Team
3 min read

Yes, with limits. NuGet Audit supports packages.config projects from NuGet 6.10, which ships with Visual Studio 2022 17.10. The audit mode setting does not apply to them, and MSBuild controls such as NoWarn and TreatWarningsAsErrors are not supported for packages.config projects.

When each form of audit arrived

NuGet.NET SDKVisual Studio 2022Feature
5.9.NET 5 SDK 5.0.200Not applicabledotnet list package with the vulnerable option
6.8.NET 8 SDK 8.0.10017.8NuGetAudit for PackageReference
6.10Not applicable17.10NuGetAudit for packages.config
6.11.NET 8 SDK 8.0.40017.11NuGetAuditSuppress for PackageReference
6.12.NET 9 SDK 9.0.10017.12Audit sources, and suppress for packages.config
7.0.NET 10 SDK 10.0.100Visual Studio 2026Audit mode default changes for .NET 10

What you get on packages.config

Audit runs as part of restore and checks your packages against vulnerability information from your audit sources. The data behind nuget.org's vulnerability list comes from the GitHub Advisory Database.

The Microsoft documentation lists these differences for packages.config:

  • The audit mode setting (direct or all) is not applicable.
  • NoWarn, TreatWarningsAsErrors and similar severity properties are not supported.
  • Suppression with NuGetAuditSuppress works from Visual Studio 17.12 and NuGet 6.12.

Compare that with a PackageReference project, where audit mode defaults to direct, and to all when the project targets net10.0 or higher.

What to do if you cannot migrate yet

  1. Run audit in Visual Studio 17.10 or later so restore reports warnings.
  2. Add a scan to CI that reads your packages.config files, so you are not relying on developer machines.
  3. Track the migration to PackageReference as a security task, since it unlocks audit mode, warning controls and central package management.
  4. Do not suppress an advisory without recording why. The documentation calls suppression a last resort, because it hides the advisory for every project that shares it.

The command line view

dotnet list package --vulnerable --include-transitive

The documentation notes that transitive packages are not included by default, so add the include option.

Migration is the real fix

Moving to PackageReference takes work, but it brings the full set of audit controls and lets you manage versions in one place. Plan it by project, starting with the ones that ship to customers, and keep a short list of which projects still use packages.config so the gap stays visible.

Quick check

Which warning codes does audit raise?

NU1901 for low, NU1902 for moderate, NU1903 for high and NU1904 for critical severity, plus NU1900 when vulnerability data cannot be fetched.

Does a clean audit mean my packages are safe?

It means no known advisory matched at that moment. The database changes, so the Microsoft docs advise checking regularly and in CI.

Safeguard's SBOM and dependency scanning can run in CI alongside the restore audit, and continuous monitoring rechecks as new advisories are published. Start with the free scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.