Skip to content

Fix NuGet Audit errors and build issues - #7913

Merged
ViktorHofer merged 10 commits into
mainfrom
FixAuditErrorsAndBuildISsues
Jul 23, 2026
Merged

ViktorHofer merged 10 commits into
mainfrom
FixAuditErrorsAndBuildISsues

Conversation

@ViktorHofer

@ViktorHofer ViktorHofer commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Unblocks dev/PR builds that have NuGet Audit enabled
Forward port #7885, #7875, #7873 and #7906

Summary:

  • Define an sdk::version entry in all global.json so that the host picks the correct SDK version (the one determined by the VMR root). Otherwise the build fails when a matching SDK is installed globally.
  • Add missing auditSources feed in arcade
  • Prepare infra to emit warnings in the VMR by updating the Exec Task with metadata
  • Fix warnNotAsError inputs when passing semicolon separated entries in (tools.sh & tools.ps1) in both the bootstrap and arcade live files.
  • Update vulnerable packages in fsharp, nuget-client, sourcelink and msbuild
  • Fix winforms not building inside the VMR when .NET Framework 4.8.1 reference assemblies aren't globally installed by marking the test utility project appropriately so that it doesn't get built by default.

@ViktorHofer
ViktorHofer requested a review from a team as a code owner July 22, 2026 18:24
Copilot AI review requested due to automatic review settings July 22, 2026 18:24
@ViktorHofer
ViktorHofer requested a review from a team as a code owner July 22, 2026 18:24
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts multiple repo build settings across the VMR to address NuGet audit/vulnerability-related build breaks and improve build logging/behavior during repo orchestration.

Changes:

  • Removes per-repo WarningsNotAsErrors demotions for NU1901–NU1904 in several Directory.Build.props/props files.
  • Updates build/orchestration scripts to handle warning demotion more reliably (escaping AdditionalWarningsNotAsErrors) and improves repo build log capture/printing.
  • Updates several repos’ global.json and bumps specific vulnerable dependency versions (notably System.Security.Cryptography.Xml and related packages).
Show a summary per file
File Description
src/xdt/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/wpf/eng/WpfArcadeSdk/tools/CodeAnalysis.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/winforms/src/BuildAssist/BuildAssist.msbuildproj Marks BuildAssist as IsTestUtilityProject; minor formatting cleanup.
src/winforms/eng/Analyzer.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/windowsdesktop/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/symreader/src/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/sourcelink/src/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/source-build-assets/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/sdk/global.json Pins SDK selection (version/rollForward/allowPrerelease).
src/sdk/Directory.Build.props Removes explicit NuGetAudit enable/official-build disable logic.
src/scenario-tests/src/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/scenario-tests/global.json Adds sdk section pinning SDK selection.
src/runtime/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/nuget-client/global.json Adds sdk section pinning SDK selection.
src/nuget-client/eng/dotnet-build/build.sh Adds /warnaserror handling + AdditionalWarningsNotAsErrors escaping.
src/nuget-client/eng/dotnet-build/build.ps1 Adds warnAsError parameter plumbed via common tools behavior.
src/msbuild/global.json Pins SDK version for msbuild repo.
src/msbuild/eng/Version.Details.xml Bumps vulnerable dependency versions to 10.0.10.
src/msbuild/eng/Version.Details.props Bumps corresponding package version properties to 10.0.10.
src/fsharp/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj Adds explicit System.Security.Cryptography.Xml reference to avoid vulnerable transitives.
src/fsharp/src/fsi/fsi.targets Adds explicit System.Security.Cryptography.Xml reference to avoid vulnerable transitives.
src/fsharp/src/FSharp.Build/FSharp.Build.fsproj Annotates/updates System.Security.Cryptography.Xml reference comment.
src/fsharp/src/fsc/fsc.targets Adds explicit System.Security.Cryptography.Xml reference to avoid vulnerable transitives.
src/fsharp/eng/Version.Details.xml Bumps System.Security.Cryptography.Xml dependency to 10.0.10.
src/fsharp/eng/Version.Details.props Bumps SystemSecurityCryptographyXmlPackageVersion to 10.0.10.
src/deployment-tools/Directory.Packages.props Removes audit suppression (now unnecessary due to updated System.Text.Json).
src/deployment-tools/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
src/cecil/global.json Adds sdk section pinning SDK selection.
src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props Removes one AdditionalWarningsNotAsErrors append location (other handling remains).
src/arcade/NuGet.config Adds explicit auditSources configuration.
src/arcade/eng/Version.Details.xml Bumps multiple runtime-carried dependencies to 10.0.10.
src/arcade/eng/Version.Details.props Bumps corresponding package version properties to 10.0.10.
src/arcade/eng/common/tools.sh Escapes AdditionalWarningsNotAsErrors for MSBuild property passing.
src/arcade/eng/common/tools.ps1 Escapes AdditionalWarningsNotAsErrors for MSBuild property passing.
src/arcade/Directory.Build.props Removes conditional NU190x demotion via WarningsNotAsErrors.
repo-projects/Directory.Build.targets Changes repo build logging to always write a per-repo log and adjusts error propagation.
repo-projects/Directory.Build.props Adds (currently unused) FlagParameterSemicolon properties.
eng/common/tools.sh Escapes AdditionalWarningsNotAsErrors for MSBuild property passing.
eng/common/tools.ps1 Escapes AdditionalWarningsNotAsErrors for MSBuild property passing.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (2)

src/nuget-client/eng/dotnet-build/build.sh:70

  • This script currently only recognizes --warnnotaserror (double-dash). Other NuGet client build scripts accept -warnnotaserror (single-dash), so callers can easily pass a flag that is ignored here. Accept both forms to keep CLI behavior consistent.
    --warnnotaserror)

repo-projects/Directory.Build.props:83

  • FlagParameterSemicolon is defined here but has no usages in the repo (no $(FlagParameterSemicolon) references). If it’s not used in this change, it should be removed to avoid accumulating unused build configuration.
  <PropertyGroup Condition="'$(BuildOS)' != 'windows'">
    <FlagParameterPrefix>--</FlagParameterPrefix>
    <ArcadeFalseBoolBuildArg>false</ArcadeFalseBoolBuildArg>
    <FlagParameterSemicolon>\;</FlagParameterSemicolon>
  </PropertyGroup>
  • Files reviewed: 39/39 changed files
  • Comments generated: 2

Comment thread repo-projects/Directory.Build.props Resolved
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team July 22, 2026 18:49
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team July 22, 2026 20:00
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team July 22, 2026 22:06
@ViktorHofer
ViktorHofer disabled auto-merge July 23, 2026 05:30
@ViktorHofer

Copy link
Copy Markdown
Member Author

@dkurepa @akoeplinger please one more approval

@ViktorHofer
ViktorHofer merged commit 515ff87 into main Jul 23, 2026
9 of 11 checks passed
@ViktorHofer
ViktorHofer deleted the FixAuditErrorsAndBuildISsues branch July 23, 2026 06:39
mthalman pushed a commit to omajid/dotnet-dotnet that referenced this pull request Jul 24, 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.

7 participants