mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Fallback cases coming from `<PackageReference />` and `packages.config` are now differentiated. In the latter case we're restoring the package through projects that target `net481`.
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Semmle.Extraction.CSharp.DependencyFetching
|
|
{
|
|
internal static class FrameworkPackageNames
|
|
{
|
|
public const string LatestNetFrameworkMoniker = "net481";
|
|
|
|
public static string LatestNetFrameworkReferenceAssemblies { get; } = $"microsoft.netframework.referenceassemblies.{LatestNetFrameworkMoniker}";
|
|
|
|
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; } =
|
|
[
|
|
"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, AspNetCoreFramework, WindowsDesktopFramework];
|
|
}
|
|
}
|