@@ -116,7 +116,7 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
116
116
if ( options . ScanNetFrameworkDlls )
117
117
{
118
118
AddNetFrameworkDlls ( dllPaths ) ;
119
- AddAspNetFrameworkDlls ( dllPaths ) ;
119
+ AddAspNetCoreFrameworkDlls ( dllPaths ) ;
120
120
AddMicrosoftWindowsDesktopDlls ( dllPaths ) ;
121
121
}
122
122
@@ -247,14 +247,14 @@ private void AddNetFrameworkDlls(List<string> dllPaths)
247
247
dllPaths . Add ( runtimeLocation ) ;
248
248
}
249
249
250
- private void AddAspNetFrameworkDlls ( List < string > dllPaths )
250
+ private void AddAspNetCoreFrameworkDlls ( List < string > dllPaths )
251
251
{
252
252
if ( ! fileContent . IsNewProjectStructureUsed || ! fileContent . UseAspNetCoreDlls )
253
253
{
254
254
return ;
255
255
}
256
256
257
- // First try to find ASP.NET assemblies in the NuGet packages
257
+ // First try to find ASP.NET Core assemblies in the NuGet packages
258
258
if ( GetPackageDirectory ( "microsoft.aspnetcore.app.ref" ) is string aspNetCorePackage )
259
259
{
260
260
progressMonitor . LogInfo ( $ "Found ASP.NET Core in NuGet packages. Not adding installation directory.") ;
@@ -678,27 +678,25 @@ private void AnalyseSolutions(IEnumerable<string> solutions)
678
678
} ) ;
679
679
}
680
680
681
- public void Dispose ( )
681
+ public void Dispose ( TemporaryDirectory ? dir , string name )
682
682
{
683
683
try
684
684
{
685
- packageDirectory ? . Dispose ( ) ;
686
- missingPackageDirectory ? . Dispose ( ) ;
685
+ dir ? . Dispose ( ) ;
687
686
}
688
687
catch ( Exception exc )
689
688
{
690
- progressMonitor . LogInfo ( "Couldn't delete package directory: " + exc . Message ) ;
689
+ progressMonitor . LogInfo ( $ "Couldn't delete { name } directory { exc . Message } " ) ;
691
690
}
691
+ }
692
+
693
+ public void Dispose ( )
694
+ {
695
+ Dispose ( packageDirectory , "package" ) ;
696
+ Dispose ( missingPackageDirectory , "missing package" ) ;
692
697
if ( cleanupTempWorkingDirectory )
693
698
{
694
- try
695
- {
696
- tempWorkingDirectory ? . Dispose ( ) ;
697
- }
698
- catch ( Exception exc )
699
- {
700
- progressMonitor . LogInfo ( "Couldn't delete temporary working directory: " + exc . Message ) ;
701
- }
699
+ Dispose ( tempWorkingDirectory , "temporary working" ) ;
702
700
}
703
701
}
704
702
}
0 commit comments