@@ -81,7 +81,7 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
81
81
var solutions = options . SolutionFile is not null
82
82
? new [ ] { options . SolutionFile }
83
83
: allNonBinaryFiles . SelectFileNamesByExtension ( ".sln" ) ;
84
- var dllDirNames = options . DllDirs . Count == 0
84
+ var dllPaths = options . DllDirs . Count == 0
85
85
? allFiles . SelectFileNamesByExtension ( ".dll" ) . ToList ( )
86
86
: options . DllDirs . Select ( Path . GetFullPath ) . ToList ( ) ;
87
87
@@ -107,20 +107,19 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
107
107
. Select ( d => Path . Combine ( packageDirectory . DirInfo . FullName , d ) )
108
108
. ToList ( ) ;
109
109
110
- // TODO: Rename the dllDirNames var - it's not only dirs anymore.
111
- dllDirNames . AddRange ( paths ) ;
112
- DownloadMissingPackages ( allNonBinaryFiles , dllDirNames ) ;
110
+ dllPaths . AddRange ( paths ) ;
111
+ DownloadMissingPackages ( allNonBinaryFiles , dllPaths ) ;
113
112
}
114
113
115
114
// Find DLLs in the .Net / Asp.Net Framework
116
115
// This block needs to come after the nuget restore, because the nuget restore might fetch the .NET Core/Framework reference assemblies.
117
116
if ( options . ScanNetFrameworkDlls )
118
117
{
119
- AddNetFrameworkDlls ( dllDirNames ) ;
120
- AddAspNetFrameworkDlls ( dllDirNames ) ;
118
+ AddNetFrameworkDlls ( dllPaths ) ;
119
+ AddAspNetFrameworkDlls ( dllPaths ) ;
121
120
}
122
121
123
- assemblyCache = new AssemblyCache ( dllDirNames , progressMonitor ) ;
122
+ assemblyCache = new AssemblyCache ( dllPaths , progressMonitor ) ;
124
123
AnalyseSolutions ( solutions ) ;
125
124
126
125
foreach ( var filename in assemblyCache . AllAssemblies . Select ( a => a . Filename ) )
@@ -220,7 +219,7 @@ private void RemoveNugetAnalyzerReferences()
220
219
}
221
220
}
222
221
223
- private void AddNetFrameworkDlls ( List < string > dllDirNames )
222
+ private void AddNetFrameworkDlls ( List < string > dllPaths )
224
223
{
225
224
// Multiple dotnet framework packages could be present.
226
225
// The order of the packages is important, we're adding the first one that is present in the nuget cache.
@@ -238,7 +237,7 @@ private void AddNetFrameworkDlls(List<string> dllDirNames)
238
237
239
238
if ( frameworkPath is not null )
240
239
{
241
- dllDirNames . Add ( frameworkPath ) ;
240
+ dllPaths . Add ( frameworkPath ) ;
242
241
progressMonitor . LogInfo ( "Found .NET Core/Framework DLLs in NuGet packages. Not adding installation directory." ) ;
243
242
return ;
244
243
}
@@ -261,10 +260,10 @@ private void AddNetFrameworkDlls(List<string> dllDirNames)
261
260
runtimeLocation ??= Runtime . ExecutingRuntime ;
262
261
263
262
progressMonitor . LogInfo ( $ ".NET runtime location selected: { runtimeLocation } ") ;
264
- dllDirNames . Add ( runtimeLocation ) ;
263
+ dllPaths . Add ( runtimeLocation ) ;
265
264
}
266
265
267
- private void AddAspNetFrameworkDlls ( List < string > dllDirNames )
266
+ private void AddAspNetFrameworkDlls ( List < string > dllPaths )
268
267
{
269
268
if ( ! fileContent . IsNewProjectStructureUsed || ! fileContent . UseAspNetCoreDlls )
270
269
{
@@ -275,12 +274,12 @@ private void AddAspNetFrameworkDlls(List<string> dllDirNames)
275
274
if ( GetPackageDirectory ( "microsoft.aspnetcore.app.ref" ) is string aspNetCorePackage )
276
275
{
277
276
progressMonitor . LogInfo ( $ "Found ASP.NET Core in NuGet packages. Not adding installation directory.") ;
278
- dllDirNames . Add ( aspNetCorePackage ) ;
277
+ dllPaths . Add ( aspNetCorePackage ) ;
279
278
}
280
279
else if ( Runtime . AspNetCoreRuntime is string aspNetCoreRuntime )
281
280
{
282
281
progressMonitor . LogInfo ( $ "ASP.NET runtime location selected: { aspNetCoreRuntime } ") ;
283
- dllDirNames . Add ( aspNetCoreRuntime ) ;
282
+ dllPaths . Add ( aspNetCoreRuntime ) ;
284
283
}
285
284
}
286
285
@@ -663,7 +662,7 @@ private void RestoreProjects(IEnumerable<string> projects, out IEnumerable<strin
663
662
assets = assetFiles ;
664
663
}
665
664
666
- private void DownloadMissingPackages ( List < FileInfo > allFiles , List < string > dllDirNames )
665
+ private void DownloadMissingPackages ( List < FileInfo > allFiles , List < string > dllPaths )
667
666
{
668
667
var nugetConfigs = allFiles . SelectFileNamesByName ( "nuget.config" ) . ToArray ( ) ;
669
668
string ? nugetConfig = null ;
@@ -712,7 +711,7 @@ private void DownloadMissingPackages(List<FileInfo> allFiles, List<string> dllDi
712
711
}
713
712
} ) ;
714
713
715
- dllDirNames . Add ( missingPackageDirectory . DirInfo . FullName ) ;
714
+ dllPaths . Add ( missingPackageDirectory . DirInfo . FullName ) ;
716
715
}
717
716
718
717
private void AnalyseSolutions ( IEnumerable < string > solutions )
0 commit comments