Repository navigation
Add task to remove blocked audit sources from NuGet.config - #54318
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Backports a source-build change to prevent NuGet Audit from attempting to reach nuget.org during offline/blocked CI restores by removing blocked entries from the auditSources section in generated NuGet.config files.
Changes:
- Opt-in specific repo-project builds (
xdt,nuget-client) to remove blocked audit sources viaRemoveBlockedAuditSources=true. - Add and wire up a new MSBuild task (
RemoveBlockedAuditSourcesFromNuGetConfig) into theUpdateNuGetConfigpipeline. - Introduce the new task implementation under
Microsoft.DotNet.UnifiedBuild.Tasks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/SourceBuild/content/repo-projects/xdt.proj | Enables RemoveBlockedAuditSources for xdt source-build project. |
| src/SourceBuild/content/repo-projects/nuget-client.proj | Enables RemoveBlockedAuditSources for nuget-client source-build project. |
| src/SourceBuild/content/repo-projects/Directory.Build.targets | Registers and invokes the new task during UpdateNuGetConfig. |
| src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/RemoveBlockedAuditSourcesFromNuGetConfig.cs | Implements XML edit to remove blocked entries from auditSources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ellahathaway
approved these changes
May 15, 2026
This was referenced May 15, 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.
Backport of dotnet/dotnet#5607
Resolves this error:
Example build