@@ -118,7 +118,7 @@ public HashSet<AssemblyLookupLocation> Restore()
118118 compilationInfoContainer . CompilationInfos . Add ( ( "NuGet feed responsiveness checked" , CheckNugetFeedResponsiveness ? "1" : "0" ) ) ;
119119
120120 HashSet < string > explicitFeeds = [ ] ;
121- string ? explicitRestoreSources = null ;
121+ string ? explicitNugetSources = null ;
122122
123123 try
124124 {
@@ -153,13 +153,13 @@ public HashSet<AssemblyLookupLocation> Restore()
153153
154154 // If feed responsiveness is being checked, we only want to use the feeds that are reachable (note this set includes private
155155 // registry feeds if they are reachable).
156- explicitRestoreSources = MakeRestoreSourcesArgument ( reachableFeeds ) ;
156+ explicitNugetSources = MakeRestoreSourcesArgument ( reachableFeeds ) ;
157157 }
158158 else if ( HasPrivateRegistryFeeds )
159159 {
160160 // If private registries are configured they need to be included as sources for the restore, which requires that
161161 // they are provided as source arguments for the restore. The private registries are included in the `allFeeds` set.
162- explicitRestoreSources = MakeRestoreSourcesArgument ( allFeeds ) ;
162+ explicitNugetSources = MakeRestoreSourcesArgument ( allFeeds ) ;
163163 }
164164
165165 using ( var nuget = new NugetExeWrapper ( fileProvider , legacyPackageDirectory , logger ) )
@@ -202,9 +202,9 @@ public HashSet<AssemblyLookupLocation> Restore()
202202 }
203203
204204 // Restore project dependencies with `dotnet restore`.
205- var restoredProjects = RestoreSolutions ( explicitRestoreSources , out var container ) ;
205+ var restoredProjects = RestoreSolutions ( explicitNugetSources , out var container ) ;
206206 var projects = fileProvider . Projects . Except ( restoredProjects ) ;
207- RestoreProjects ( projects , explicitRestoreSources , out var containers ) ;
207+ RestoreProjects ( projects , explicitNugetSources , out var containers ) ;
208208
209209 var dependencies = containers . Flatten ( container ) ;
210210
@@ -291,7 +291,7 @@ private List<string> GetReachableFallbackNugetFeeds(HashSet<string>? feedsFromNu
291291 /// Populates dependencies with the relevant dependencies from the assets files generated by the restore.
292292 /// Returns a list of projects that are up to date with respect to restore.
293293 /// </summary>
294- private IEnumerable < string > RestoreSolutions ( string ? explicitRestoreSources , out DependencyContainer dependencies )
294+ private IEnumerable < string > RestoreSolutions ( string ? nugetSources , out DependencyContainer dependencies )
295295 {
296296 var successCount = 0 ;
297297 var nugetSourceFailures = 0 ;
@@ -302,7 +302,7 @@ private IEnumerable<string> RestoreSolutions(string? explicitRestoreSources, out
302302 var projects = fileProvider . Solutions . SelectMany ( solution =>
303303 {
304304 logger . LogInfo ( $ "Restoring solution { solution } ...") ;
305- var res = dotnet . Restore ( new ( solution , PackageDirectory . DirInfo . FullName , ForceDotnetRefAssemblyFetching : true , ExtraArgs : explicitRestoreSources , TargetWindows : isWindows ) ) ;
305+ var res = dotnet . Restore ( new ( solution , PackageDirectory . DirInfo . FullName , ForceDotnetRefAssemblyFetching : true , NugetSources : nugetSources , TargetWindows : isWindows ) ) ;
306306 if ( res . Success )
307307 {
308308 successCount ++ ;
@@ -357,7 +357,7 @@ private void RestoreProjects(IEnumerable<string> projects, string? explicitResto
357357 foreach ( var project in projectGroup )
358358 {
359359 logger . LogInfo ( $ "Restoring project { project } ...") ;
360- var res = dotnet . Restore ( new ( project , PackageDirectory . DirInfo . FullName , ForceDotnetRefAssemblyFetching : true , ExtraArgs : explicitRestoreSources , TargetWindows : isWindows ) ) ;
360+ var res = dotnet . Restore ( new ( project , PackageDirectory . DirInfo . FullName , ForceDotnetRefAssemblyFetching : true , NugetSources : explicitRestoreSources , TargetWindows : isWindows ) ) ;
361361 assets . AddDependenciesRange ( res . AssetsFilePaths ) ;
362362 lock ( sync )
363363 {
0 commit comments