From bede50e9d5d0f217b63d391f31fe5a2ddc3b45fc Mon Sep 17 00:00:00 2001 From: Maruf61 Date: Thu, 5 May 2022 17:46:06 +0300 Subject: [PATCH] Added net7 Support (#78) * Added net7 Support * Added net7 Support * Apply suggestions from code review Co-authored-by: Andrew Rublyov * Fixed Order * Fixed Order Co-authored-by: Andrew Rublyov --- README.md | 1 + src/dotnet/Rider.Plugins.EfCore/EfCoreHelper.cs | 2 ++ src/dotnet/Rider.Plugins.EfCore/EfCoreSupportedTarget.cs | 1 + 3 files changed, 4 insertions(+) diff --git a/README.md b/README.md index a2fbcaf2..88cc8471 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ More about features and available dialogs you could read in [**the blog post**]( [//]: # ( or JetBrains Rider **2022.1 EAP1**) - EF Core **5.0+** with projects under such target frameworks: + - `net7.0` (preview) - `net6.0` - `net5.0` - `netcoreapp3.1` diff --git a/src/dotnet/Rider.Plugins.EfCore/EfCoreHelper.cs b/src/dotnet/Rider.Plugins.EfCore/EfCoreHelper.cs index ff1ad72c..005e107f 100644 --- a/src/dotnet/Rider.Plugins.EfCore/EfCoreHelper.cs +++ b/src/dotnet/Rider.Plugins.EfCore/EfCoreHelper.cs @@ -41,12 +41,14 @@ private static IEnumerable GetSupportedDotnetProjects(this IProjectCol private static bool IsMigrationProjectSupported(TargetFrameworkId targetFrameworkId) => targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.Net5) || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.Net6) + || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.Net7) || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.NetCore31) || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.NetStandard21); private static bool IsStartupProjectSupported(TargetFrameworkId targetFrameworkId) => targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.Net5) || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.Net6) + || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.Net7) || targetFrameworkId.UniqueString.StartsWith(EfCoreSupportedTarget.NetCore31); private static bool StartupProjectPackagesInstalled(IProject project) => diff --git a/src/dotnet/Rider.Plugins.EfCore/EfCoreSupportedTarget.cs b/src/dotnet/Rider.Plugins.EfCore/EfCoreSupportedTarget.cs index 476f5a75..d72e0050 100644 --- a/src/dotnet/Rider.Plugins.EfCore/EfCoreSupportedTarget.cs +++ b/src/dotnet/Rider.Plugins.EfCore/EfCoreSupportedTarget.cs @@ -4,6 +4,7 @@ public static class EfCoreSupportedTarget { public const string Net5 = "net5.0"; public const string Net6 = "net6.0"; + public const string Net7 = "net7.0"; public const string NetCore31 = ".NETCoreApp,Version=v3.1"; public const string NetStandard21 = ".NETStandard,Version=v2.1"; }