Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ca82ec3
Refactor `GetReachableNuGetFeeds` out of `GetReachableFallbackNugetFe…
mbg Feb 27, 2026
7e4567a
Use `GetReachableNuGetFeeds` in `CheckSpecifiedFeeds`
mbg Feb 27, 2026
4135443
Inline `CheckFeeds`
mbg Feb 27, 2026
c76efaa
Use `explicitFeeds` directly
mbg Feb 27, 2026
76a2737
Divide up `CheckSpecifiedFeeds`
mbg Feb 27, 2026
6e09dd5
Check reachability of inherited feeds
mbg Feb 27, 2026
1b76e30
Only use reachable feeds when private registries are configured
mbg Feb 27, 2026
9357f95
C#: Turn checkNugetFeedResponsiveness into a field and remove some ex…
michaelnebel Apr 9, 2026
56d37b9
C#: Add private registries to the set of explicit feeds. Always use s…
michaelnebel Apr 9, 2026
d8cd037
C#: Make sure that the feeds that excluded for the feed check (based …
michaelnebel Apr 9, 2026
16afe30
C#: Remove redundant out parameter from CheckSpecifiedFeeds.
michaelnebel Apr 9, 2026
9bfd0cb
C#: Address review comments.
michaelnebel Apr 9, 2026
1ab44c3
C#: Re-add the compilation information on reachable fallback NuGet fe…
michaelnebel Apr 9, 2026
1f737da
C#: For specific listed nuget feeds in a project, still allow their u…
michaelnebel Apr 10, 2026
66b3571
C#: Simplify and improve the reachability check and improve the logging.
michaelnebel Apr 10, 2026
3ce296d
C#: Rename ExtraArgs to NugetSources.
michaelnebel Apr 10, 2026
d801e28
C#: Handle special case when no feeds are reachable.
michaelnebel Apr 10, 2026
9359731
C#: Only use the default package source when using nuget.exe if it is…
michaelnebel Apr 10, 2026
c4771f3
C#: Only include feeds that we can connect to.
michaelnebel Apr 10, 2026
dd880ed
C#: Change the All NuGet feed reachable telemetry.
michaelnebel Apr 13, 2026
809fb27
C#: Update integration test expected output.
michaelnebel Apr 13, 2026
5e5a428
C#: Add change-note.
michaelnebel Apr 10, 2026
c623e23
C#: Address Copilots review comments.
michaelnebel Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ private string GetRestoreArgs(RestoreSettings restoreSettings)
args += " /p:EnableWindowsTargeting=true";
}

if (restoreSettings.ExtraArgs is not null)
if (restoreSettings.NugetSources is not null)
{
args += $" {restoreSettings.ExtraArgs}";
args += $" {restoreSettings.NugetSources}";
}

return args;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IDotNet
IList<string> GetNugetFeedsFromFolder(string folderPath);
}

public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? ExtraArgs = null, string? PathToNugetConfig = null, bool ForceReevaluation = false, bool TargetWindows = false);
public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? NugetSources = null, string? PathToNugetConfig = null, bool ForceReevaluation = false, bool TargetWindows = false);

public partial record class RestoreResult(bool Success, IList<string> Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class NugetExeWrapper : IDisposable
/// <summary>
/// Create the package manager for a specified source tree.
/// </summary>
public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger)
public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger, Func<bool> useDefaultFeed)
{
this.fileProvider = fileProvider;
this.packageDirectory = packageDirectory;
Expand All @@ -43,7 +43,7 @@ public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDir
{
logger.LogInfo($"Found packages.config files, trying to use nuget.exe for package restore");
nugetExe = ResolveNugetExe();
if (HasNoPackageSource())
if (HasNoPackageSource() && useDefaultFeed())
{
// We only modify or add a top level nuget.config file
nugetConfigPath = Path.Combine(fileProvider.SourceDir.FullName, "nuget.config");
Expand Down
Loading
Loading