Skip to content

Commit cd64195

Browse files
committed
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%.
1 parent 728f3bc commit cd64195

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp.Standalone/BuildAnalysis.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public BuildAnalysis(Options options, ProgressMonitor progressMonitor)
5555
this.progressMonitor.FindingFiles(options.SrcDir);
5656

5757
this.allSources = GetFiles("*.cs").ToArray();
58-
58+
var allProjects = GetFiles("*.csproj");
5959
var solutions = options.SolutionFile is not null
6060
? new[] { options.SolutionFile }
6161
: GetFiles("*.sln");
@@ -94,6 +94,7 @@ public BuildAnalysis(Options options, ProgressMonitor progressMonitor)
9494
using (new FileRenamer(sourceDir.GetFiles("global.json", SearchOption.AllDirectories)))
9595
{
9696
Restore(solutions);
97+
Restore(allProjects);
9798
}
9899
}
99100

0 commit comments

Comments
 (0)