Skip to content

Commit d04bf6b

Browse files
committed
C#: Don't include Semmle.* dlls, if the executing runtime is used as framework.
1 parent 646b272 commit d04bf6b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,17 @@ private void AddNetFrameworkDlls(ISet<AssemblyPath> dllPaths, ISet<string> frame
368368
}
369369
}
370370

371-
runtimeLocation ??= Runtime.ExecutingRuntime;
371+
if (runtimeLocation is null)
372+
{
373+
runtimeLocation ??= Runtime.ExecutingRuntime;
374+
dllPaths.Add(new AssemblyPath(runtimeLocation, name => !name.StartsWith("Semmle.")));
375+
}
376+
else
377+
{
378+
dllPaths.Add(runtimeLocation);
379+
}
372380

373381
logger.LogInfo($".NET runtime location selected: {runtimeLocation}");
374-
dllPaths.Add(runtimeLocation);
375382
frameworkLocations.Add(runtimeLocation);
376383
}
377384

0 commit comments

Comments
 (0)