Execute dotnet restore on all projects in standalone

Previously, we only did this for the solution files in the repository, but
there might be projects that are not added to any solution. This change
improves the percentage of found assemblies on the Powershell repo from
81% to 95%.
This commit is contained in:
Tamas Vajk
2023-07-04 12:43:00 +02:00
parent 728f3bce2d
commit cd6419503f

View File

@@ -55,7 +55,7 @@ namespace Semmle.BuildAnalyser
this.progressMonitor.FindingFiles(options.SrcDir);
this.allSources = GetFiles("*.cs").ToArray();
var allProjects = GetFiles("*.csproj");
var solutions = options.SolutionFile is not null
? new[] { options.SolutionFile }
: GetFiles("*.sln");
@@ -94,6 +94,7 @@ namespace Semmle.BuildAnalyser
using (new FileRenamer(sourceDir.GetFiles("global.json", SearchOption.AllDirectories)))
{
Restore(solutions);
Restore(allProjects);
}
}