Repository navigation
Re-enable NuGet audit for main (port of #6729) - #6753
Merged
Merged
Conversation
…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
force-pushed
the
copilot/port-change-to-main
branch
from
May 22, 2026 17:30
d183b13 to
45f6c5e
Compare
akoeplinger
approved these changes
May 22, 2026
akoeplinger
reviewed
May 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Scopes the NuGet audit disablement to official builds to work around MSBuild’s mishandling of WarningsNotAsErrors for NuGet warnings, restoring audit behavior for developer builds.
Changes:
- Disable
NuGetAuditonly when$(OfficialBuild) == 'true'(instead of unconditionally) in the SDK and tools build props. - Add an
OfficialBuilddefault/derivation (when Arcade SDK import is skipped) and applyOfficialBuild-conditionedNuGetAudit=falseat the repo level.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Directory.Build.props | Adds OfficialBuild initialization (for non-Arcade imports) and disables NuGetAudit for official builds. |
| eng/tools/Directory.Build.props | Disables NuGetAudit for official builds for eng/tools projects. |
| src/sdk/Directory.Build.props | Replaces unconditional audit disable with an official-build-only disable and updates the rationale comment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ViktorHofer
approved these changes
May 26, 2026
ViktorHofer
approved these changes
May 28, 2026
mthalman
pushed a commit
to mthalman/dotnet
that referenced
this pull request
Jun 2, 2026
Co-authored-by: Marc Paine <[email protected]> Co-authored-by: Copilot <[email protected]>
This was referenced Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of #6729 to
main. NuGet audit was disabled unconditionally as a workaround for dotnet/msbuild#10801, whereWarningsNotAsErrorsis mishandled for NuGet warnings, turning audit findings into hard errors in official builds. The fix scopes the disable toOfficialBuildonly, restoring audit for local and CI dev builds.Changes
Directory.Build.props— add<NuGetAudit Condition="'$(OfficialBuild)' == 'true'">false</NuGetAudit>alongside the existing offline-build conditioneng/tools/Directory.Build.props— addOfficialBuild-conditionedNuGetAudit=falsesrc/sdk/Directory.Build.props— replace unconditionalNuGetAudit=false+ TODO (dotnet/sdk#51466) withOfficialBuild-conditioned disable