Skip to content

Re-enable NuGet audit for release/10.0.4xx - #6729

Merged
marcpopMSFT merged 1 commit into
release/10.0.4xxfrom
reenable-nuget-audit-10.0.4xx
May 21, 2026
Merged

marcpopMSFT merged 1 commit into
release/10.0.4xxfrom
reenable-nuget-audit-10.0.4xx

Conversation

@marcpopMSFT

Copy link
Copy Markdown
Member

This is the release/10.0.4xx counterpart to #6620 and #6637.

Removes the NuGet audit workarounds (NuGetAuditSuppress items and unconditional NuGetAudit=false) that were added to unblock builds. NuGet audit is now disabled only in official builds due to an MSBuild bug (dotnet/msbuild#10801) where WarningsNotAsErrors is not correctly handled for NuGet warnings.

Changes

  • Directory.Build.props: Add NuGetAudit=false conditioned on OfficialBuild
  • eng/tools/Directory.Build.props: Replace NuGetAuditSuppress items with NuGetAudit=false for OfficialBuild only
  • src/sdk/Directory.Build.props: Replace unconditional NuGetAudit=false (ref [release/8.0.4xx] Enable Nuget Audit sdk#51466) with OfficialBuild-conditioned disable

Removes the NuGet audit workarounds (NuGetAuditSuppress items and
unconditional NuGetAudit=false) that were added to unblock builds.
NuGet audit is now disabled only in official builds due to an MSBuild
bug (dotnet/msbuild#10801) where WarningsNotAsErrors is not correctly
handled for NuGet warnings, causing audit findings to become errors
via TreatWarningsAsErrors. Audit remains enabled for local and CI
dev builds.

Changes:
- Directory.Build.props: Add NuGetAudit=false for OfficialBuild only
- eng/tools/Directory.Build.props: Replace NuGetAuditSuppress items
  with NuGetAudit=false for OfficialBuild only
- src/sdk/Directory.Build.props: Replace unconditional NuGetAudit=false
  with OfficialBuild-conditioned disable

Co-authored-by: Copilot <[email protected]>
@marcpopMSFT
marcpopMSFT requested review from a team as code owners May 20, 2026 21:53
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team May 20, 2026 21:53
@marcpopMSFT
marcpopMSFT enabled auto-merge (squash) May 20, 2026 22:01
@marcpopMSFT
marcpopMSFT merged commit 0cde8d1 into release/10.0.4xx May 21, 2026
8 checks passed
@marcpopMSFT
marcpopMSFT deleted the reenable-nuget-audit-10.0.4xx branch May 21, 2026 00:36
marcpopMSFT added a commit that referenced this pull request May 22, 2026
…port fallback

Port of #6729 to main with fix for SkipArcadeSdkImport projects.

Projects like BinaryToolKit and MSBuildSdkResolver set
SkipArcadeSdkImport=true, which prevents Arcade SDK from being
imported. Since OfficialBuild is derived from OfficialBuildId by
Arcade's DefaultVersions.props, it was never set for these projects.

Add the OfficialBuild derivation to the SkipArcadeSdkImport fallback
block (which is documented as 'keep in sync with Arcade SDK') so the
NuGetAudit disable condition and all other properties that depend on
OfficialBuild work correctly for non-Arcade projects.

Co-authored-by: Copilot <[email protected]>
marcpopMSFT added a commit that referenced this pull request May 28, 2026
mthalman pushed a commit to mthalman/dotnet that referenced this pull request Jun 2, 2026
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.

2 participants