@@ -156,7 +156,7 @@ public HashSet<AssemblyLookupLocation> Restore()
156156
157157 var restoredProjects = RestoreSolutions ( out var container ) ;
158158 var projects = fileProvider . Projects . Except ( restoredProjects ) ;
159- RestoreProjects ( projects , out var containers ) ;
159+ RestoreProjects ( projects , explicitFeeds , out var containers ) ;
160160
161161 var dependencies = containers . Flatten ( container ) ;
162162
@@ -260,8 +260,12 @@ private IEnumerable<string> RestoreSolutions(out DependencyContainer dependencie
260260 /// Populates dependencies with the relative paths to the assets files generated by the restore.
261261 /// </summary>
262262 /// <param name="projects">A list of paths to project files.</param>
263- private void RestoreProjects ( IEnumerable < string > projects , out ConcurrentBag < DependencyContainer > dependencies )
263+ private void RestoreProjects ( IEnumerable < string > projects , HashSet < string > ? configuredSources , out ConcurrentBag < DependencyContainer > dependencies )
264264 {
265+ var sources = configuredSources ?? new ( ) ;
266+ sources . Add ( PublicNugetOrgFeed ) ;
267+ this . dependabotProxy ? . RegistryURLs . ForEach ( url => sources . Add ( url ) ) ;
268+
265269 var successCount = 0 ;
266270 var nugetSourceFailures = 0 ;
267271 ConcurrentBag < DependencyContainer > collectedDependencies = [ ] ;
@@ -276,7 +280,7 @@ private void RestoreProjects(IEnumerable<string> projects, out ConcurrentBag<Dep
276280 foreach ( var project in projectGroup )
277281 {
278282 logger . LogInfo ( $ "Restoring project { project } ...") ;
279- var res = dotnet . Restore ( new ( project , PackageDirectory . DirInfo . FullName , ForceDotnetRefAssemblyFetching : true , TargetWindows : isWindows ) ) ;
283+ var res = dotnet . Restore ( new ( project , PackageDirectory . DirInfo . FullName , ForceDotnetRefAssemblyFetching : true , sources . ToList ( ) , TargetWindows : isWindows ) ) ;
280284 assets . AddDependenciesRange ( res . AssetsFilePaths ) ;
281285 lock ( sync )
282286 {
0 commit comments