Skip to content

Commit 7b91be6

Browse files
committed
C#: Allways add Windows Desktop App dlls if the NuGet package is downloaded.
1 parent 11505d6 commit 7b91be6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
117117
{
118118
AddNetFrameworkDlls(dllPaths);
119119
AddAspNetFrameworkDlls(dllPaths);
120+
AddMicrosoftWindowsDesktopDlls(dllPaths);
120121
}
121122

122123
assemblyCache = new AssemblyCache(dllPaths, progressMonitor);
@@ -266,6 +267,15 @@ private void AddAspNetFrameworkDlls(List<string> dllPaths)
266267
}
267268
}
268269

270+
private void AddMicrosoftWindowsDesktopDlls(List<string> dllPaths)
271+
{
272+
if (GetPackageDirectory("microsoft.windowsdesktop.app.ref") is string windowsDesktopApp)
273+
{
274+
progressMonitor.LogInfo($"Found Windows Desktop App in NuGet packages.");
275+
dllPaths.Add(windowsDesktopApp);
276+
}
277+
}
278+
269279
private string? GetPackageDirectory(string packagePrefix)
270280
{
271281
if (!options.UseNuGet)

0 commit comments

Comments
 (0)