Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9eb7583
Refactor `GetReachableNuGetFeeds` out of `GetReachableFallbackNugetFe…
mbg Feb 27, 2026
b01a14f
Use `GetReachableNuGetFeeds` in `CheckSpecifiedFeeds`
mbg Feb 27, 2026
bf29e94
Inline `CheckFeeds`
mbg Feb 27, 2026
e687196
Use `explicitFeeds` directly
mbg Feb 27, 2026
65953c0
Divide up `CheckSpecifiedFeeds`
mbg Feb 27, 2026
7ff355b
Check reachability of inherited feeds
mbg Feb 27, 2026
eaebca7
Only use reachable feeds when private registries are configured
mbg Feb 27, 2026
53c2867
C#: Turn checkNugetFeedResponsiveness into a field and remove some ex…
michaelnebel Apr 9, 2026
4f2e3f3
C#: Add private registries to the set of explicit feeds. Always use s…
michaelnebel Apr 9, 2026
0c371a8
C#: Make sure that the feeds that excluded for the feed check (based …
michaelnebel Apr 9, 2026
790835c
C#: Remove redundant out parameter from CheckSpecifiedFeeds.
michaelnebel Apr 9, 2026
8e698f2
C#: Address review comments.
michaelnebel Apr 9, 2026
2a70a9c
C#: Re-add the compilation information on reachable fallback NuGet fe…
michaelnebel Apr 9, 2026
650e382
C#: For specific listed nuget feeds in a project, still allow their u…
michaelnebel Apr 10, 2026
dc13650
C#: Simplify and improve the reachability check and improve the logging.
michaelnebel Apr 10, 2026
0511243
C#: Rename ExtraArgs to NugetSources.
michaelnebel Apr 10, 2026
0451894
C#: Handle special case when no feeds are reachable.
michaelnebel Apr 10, 2026
01d8b59
C#: Only use the default package source when using nuget.exe if it is…
michaelnebel Apr 10, 2026
46ebf88
C#: Add change-note.
michaelnebel Apr 10, 2026
e91693f
C#: Only include feeds that we can connect to.
michaelnebel Apr 10, 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