Fix build failures and NuGet Audit errors - #7915
Merged
Merged
Conversation
|
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. |
mmitche
approved these changes
Jul 22, 2026
Create an empty global.json to isolate the test environment.
ViktorHofer
enabled auto-merge (squash)
July 22, 2026 21:19
mmitche
approved these changes
Jul 22, 2026
wtgodbe
approved these changes
Jul 22, 2026
akoeplinger
approved these changes
Jul 22, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 76899f89-7bef-49eb-9f36-d6cc2d897723
ViktorHofer
disabled auto-merge
July 23, 2026 05:28
Member
Author
|
@dkurepa @akoeplinger one more approval please |
dkurepa
approved these changes
Jul 23, 2026
Contributor
There was a problem hiding this comment.
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 repoNuGet.configfiles, 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/-warnNotAsErrorand isolate test execution roots via local emptyglobal.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.
This was referenced Jul 24, 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.
Forward port of #7906 & #7875