Skip to content

Use /p:RestoreIgnoreFailedSources=true for dotnet restore#21386

Open
mbg wants to merge 1 commit intomainfrom
mbg/csharp/dotnet-restore-improvements
Open

Use /p:RestoreIgnoreFailedSources=true for dotnet restore#21386
mbg wants to merge 1 commit intomainfrom
mbg/csharp/dotnet-restore-improvements

Conversation

@mbg
Copy link
Member

@mbg mbg commented Feb 27, 2026

dotnet restore tends to take a very long time to run if there are multiple NuGet feeds and some of them are consistently not reachable. As an experiment (suggested by @michaelnebel), this PR adds the /p:RestoreIgnoreFailedSources=true option when we call dotnet restore in the BMN extractor.

@mbg mbg self-assigned this Feb 27, 2026
Copilot AI review requested due to automatic review settings February 27, 2026 14:52
@mbg mbg requested a review from a team as a code owner February 27, 2026 14:52
@github-actions github-actions bot added the C# label Feb 27, 2026
Copy link
Contributor

Copilot AI left a comment

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 adds the /p:RestoreIgnoreFailedSources=true option to all dotnet restore commands in the C# extractor to improve performance when multiple NuGet feeds are configured and some are consistently unreachable.

Changes:

  • Added /p:RestoreIgnoreFailedSources=true flag to the GetRestoreArgs method in the DotNet utility class
  • Updated all 5 related unit tests to verify the new command structure includes the flag

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs Added the /p:RestoreIgnoreFailedSources=true flag to the restore command arguments
csharp/extractor/Semmle.Extraction.Tests/DotNet.cs Updated 5 test assertions to include the new flag in the expected command strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants