mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
Change desktop dotnet assembly lookup to fall back to nuget reference assemblies
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
internal static class FrameworkPackageNames
|
||||
{
|
||||
public static string LatestNetFrameworkReferenceAssemblies { get; } = "microsoft.netframework.referenceassemblies.net481";
|
||||
|
||||
public static string AspNetCoreFramework { get; } = "microsoft.aspnetcore.app.ref";
|
||||
|
||||
public static string WindowsDesktopFramework { get; } = "microsoft.windowsdesktop.app.ref";
|
||||
|
||||
// The order of the packages is important.
|
||||
public static string[] NetFrameworks { get; } = new string[]
|
||||
{
|
||||
public static string[] NetFrameworks { get; } =
|
||||
[
|
||||
"microsoft.netcore.app.ref", // net7.0, ... net5.0, netcoreapp3.1, netcoreapp3.0
|
||||
"microsoft.netframework.referenceassemblies.", // net48, ..., net20
|
||||
"netstandard.library.ref", // netstandard2.1
|
||||
"netstandard.library" // netstandard2.0
|
||||
};
|
||||
];
|
||||
|
||||
public static IEnumerable<string> AllFrameworks { get; } =
|
||||
NetFrameworks
|
||||
.Union(new string[] { AspNetCoreFramework, WindowsDesktopFramework });
|
||||
[.. NetFrameworks, AspNetCoreFramework, WindowsDesktopFramework];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user