Skip to content

Fix build failures and NuGet Audit errors - #7915

Merged
ViktorHofer merged 5 commits into
release/10.0.4xxfrom
Fix4xxBuildFailuresAndAudit
Jul 23, 2026
Merged

ViktorHofer merged 5 commits into
release/10.0.4xxfrom
Fix4xxBuildFailuresAndAudit

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

Forward port of #7906 & #7875

@ViktorHofer
ViktorHofer requested review from a team as code owners July 22, 2026 20:13
@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.

@dotnet-policy-service
dotnet-policy-service Bot requested review from a team July 22, 2026 20:14
Create an empty global.json to isolate the test environment.
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team July 22, 2026 21:16
@ViktorHofer
ViktorHofer enabled auto-merge (squash) July 22, 2026 21:19
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team July 22, 2026 22:03
ViktorHofer and others added 2 commits July 23, 2026 00:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 76899f89-7bef-49eb-9f36-d6cc2d897723
@ViktorHofer
ViktorHofer disabled auto-merge July 23, 2026 05:28
@ViktorHofer

Copy link
Copy Markdown
Member Author

@dkurepa @akoeplinger one more approval please

@ViktorHofer
ViktorHofer merged commit e109758 into release/10.0.4xx Jul 23, 2026
7 of 9 checks passed
@ViktorHofer
ViktorHofer deleted the Fix4xxBuildFailuresAndAudit branch July 23, 2026 06:39

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 forward-ports fixes to unblock builds and address NuGet Audit behavior across the VMR and several inner repos, including enabling audit sources where appropriate, updating vulnerable package versions, and improving build/test isolation and warning handling.

Changes:

  • Add/standardize auditSources (nuget.org) across multiple repo NuGet.config files, and ensure offline builds remove blocked audit sources.
  • Update/override vulnerable transitive dependencies (notably System.Security.Cryptography.Xml) and adjust SDK/global.json pins for release/10.0.3xx builds.
  • Extend build scripts/tooling to support --warnNotAsError / -warnNotAsError and isolate test execution roots via local empty global.json.

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/Microsoft.DotNet.SourceBuild.Tests/SourcelinkTests.cs Ensures SourceLink tool runs with an isolated working directory.
test/Microsoft.DotNet.SourceBuild.Tests/OmniSharpTests.cs Uses the test projects root for OmniSharp working directory isolation.
test/Microsoft.DotNet.SourceBuild.Tests/DotNetHelper.cs Forces a consistent working directory and creates a local empty global.json to isolate test execution.
src/vstest/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/templating/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/templating/Directory.Build.props Removes conditional NU190x demotion logic tied to official builds.
src/sourcelink/src/Directory.Packages.props Pins System.Security.Cryptography.Xml to address audit findings.
src/sourcelink/src/Directory.Build.props Removes conditional NU190x demotion logic tied to official builds.
src/sourcelink/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/sourcelink/eng/Versions.props Removes runtime System.Text.Json pin (moved to flowed versions).
src/sourcelink/eng/Version.Details.xml Adds flowed dependencies for System.Security.Cryptography.Xml and System.Text.Json.
src/sourcelink/eng/Version.Details.props Introduces version properties for System.Security.Cryptography.Xml and System.Text.Json.
src/source-build-assets/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/source-build-assets/Directory.Build.props Removes conditional NU190x demotion logic tied to official builds.
src/sdk/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/sdk/global.json Pins SDK version used by the inner sdk repo.
src/sdk/Directory.Build.props Removes explicit NuGetAudit enable/disable blocks previously conditioned on OfficialBuild.
src/scenario-tests/src/Directory.Build.targets Writes empty global.json into test root to isolate from repo root global.json.
src/scenario-tests/src/Directory.Build.props Removes conditional NU190x demotion logic tied to official builds.
src/scenario-tests/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/scenario-tests/global.json Updates tool and SDK versions used by scenario tests.
src/roslyn/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/nuget-client/src/NuGet.Core/NuGet.Build.Tasks/NuGet.Build.Tasks.csproj Adds explicit System.Security.Cryptography.Xml reference to override vulnerable transitives.
src/nuget-client/src/NuGet.Core/NuGet.Build.Tasks.Console/NuGet.Build.Tasks.Console.csproj Adds explicit System.Security.Cryptography.Xml reference to override vulnerable transitives.
src/nuget-client/global.json Pins SDK version and allows prerelease to match branch/tooling needs.
src/nuget-client/eng/Version.Details.xml Updates System.Security.Cryptography.Xml dependency version.
src/nuget-client/eng/Version.Details.props Updates System.Security.Cryptography.Xml package version property.
src/nuget-client/eng/dotnet-build/build.sh Adds --warnnotaserror handling and forwards to MSBuild.
src/nuget-client/eng/dotnet-build/build.ps1 Adds warnAsError / warnNotAsError parameters to integrate with common tooling.
src/nuget-client/Directory.Packages.props Updates System.Security.Cryptography.Xml package version default.
src/nuget-client/build/common.project.props Appends AdditionalWarningsNotAsErrors into WarningsNotAsErrors for non-Arcade restore paths.
src/msbuild/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/msbuild/global.json Pins SDK version used by the inner msbuild repo.
src/msbuild/eng/Version.Details.xml Updates several runtime package dependency versions (incl. crypto/xml).
src/msbuild/eng/Version.Details.props Updates several runtime package version properties (incl. crypto/xml).
src/fsharp/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj Adds explicit System.Security.Cryptography.Xml reference to override vulnerable transitives.
src/fsharp/src/fsi/fsi.targets Adds explicit System.Security.Cryptography.Xml reference to override vulnerable transitives.
src/fsharp/src/FSharp.Build/FSharp.Build.fsproj Annotates/aligns System.Security.Cryptography.Xml reference intent.
src/fsharp/src/fsc/fsc.targets Adds explicit System.Security.Cryptography.Xml reference to override vulnerable transitives.
src/fsharp/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/fsharp/eng/Version.Details.xml Updates System.Security.Cryptography.Xml dependency version.
src/fsharp/eng/Version.Details.props Updates System.Security.Cryptography.Xml package version property.
src/diagnostics/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props Adjusts audit defaults/official-build behavior and supports Additional* warning properties.
src/arcade/NuGet.config Adds auditSources pointing at nuget.org for audit enablement.
src/arcade/eng/common/tools.sh Adds warn_not_as_error plumbing into Arcade MSBuild invocation.
src/arcade/eng/common/tools.ps1 Adds warnNotAsError plumbing into Arcade MSBuild invocation.
src/arcade/eng/common/build.sh Adds CLI parsing/help for --warnNotAsError.
src/arcade/eng/common/build.ps1 Adds CLI parsing/help for -warnNotAsError.
src/arcade/Directory.Build.props Removes conditional NU190x demotion logic tied to official builds.
repo-projects/nuget-client.proj Disables NuGetAudit for nuget-client official builds via BuildArgs.
repo-projects/Directory.Build.targets Adjusts offline audit-source removal and changes repo build logging to always emit log file + replay on error.
repo-projects/Directory.Build.props Adds FlagParameterSemicolon for consistent cross-OS argument construction.
global.json Pins repo-level SDK and roll-forward policy for the branch.
eng/tools/Directory.Build.props Removes official-build NuGetAudit disable block.
eng/common/tools.sh Adds warn_not_as_error plumbing into common MSBuild invocation.
eng/common/tools.ps1 Adds warnNotAsError plumbing into common MSBuild invocation.
eng/common/build.sh Adds CLI parsing/help for --warnNotAsError.
eng/common/build.ps1 Adds CLI parsing/help for -warnNotAsError.

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

Comment thread repo-projects/Directory.Build.targets
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.

6 participants