C#: Allways add Windows Desktop App dlls if the NuGet package is downloaded.

This commit is contained in:
Michael Nebel
2023-11-02 16:08:17 +01:00
parent 11505d6842
commit 7b91be6c52

View File

@@ -117,6 +117,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
AddNetFrameworkDlls(dllPaths);
AddAspNetFrameworkDlls(dllPaths);
AddMicrosoftWindowsDesktopDlls(dllPaths);
}
assemblyCache = new AssemblyCache(dllPaths, progressMonitor);
@@ -266,6 +267,15 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
}
}
private void AddMicrosoftWindowsDesktopDlls(List<string> dllPaths)
{
if (GetPackageDirectory("microsoft.windowsdesktop.app.ref") is string windowsDesktopApp)
{
progressMonitor.LogInfo($"Found Windows Desktop App in NuGet packages.");
dllPaths.Add(windowsDesktopApp);
}
}
private string? GetPackageDirectory(string packagePrefix)
{
if (!options.UseNuGet)