C#: Use dotnet --list-runtimes to find runtime locations.

This commit is contained in:
Michael Nebel
2023-07-05 13:36:44 +02:00
parent bb521d7c75
commit 6a87755ff1
3 changed files with 139 additions and 44 deletions

View File

@@ -66,7 +66,7 @@ namespace Semmle.BuildAnalyser
// Find DLLs in the .Net Framework
if (options.ScanNetFrameworkDlls)
{
var runtimeLocation = Runtime.GetRuntime(options.UseSelfContainedDotnet);
var runtimeLocation = new Runtime(dotnet).GetRuntime(options.UseSelfContainedDotnet);
progressMonitor.Log(Util.Logging.Severity.Debug, $"Runtime location selected: {runtimeLocation}");
dllDirNames.Add(runtimeLocation);
}