diff --git a/src/EFCore.Design/build/net8.0/Microsoft.EntityFrameworkCore.Design.props b/src/EFCore.Design/build/net10.0/Microsoft.EntityFrameworkCore.Design.props
similarity index 100%
rename from src/EFCore.Design/build/net8.0/Microsoft.EntityFrameworkCore.Design.props
rename to src/EFCore.Design/build/net10.0/Microsoft.EntityFrameworkCore.Design.props
diff --git a/src/EFCore.SqlServer.HierarchyId/build/net8.0/Microsoft.EntityFrameworkCore.SqlServer.HierarchyId.targets b/src/EFCore.SqlServer.HierarchyId/build/net10.0/Microsoft.EntityFrameworkCore.SqlServer.HierarchyId.targets
similarity index 100%
rename from src/EFCore.SqlServer.HierarchyId/build/net8.0/Microsoft.EntityFrameworkCore.SqlServer.HierarchyId.targets
rename to src/EFCore.SqlServer.HierarchyId/build/net10.0/Microsoft.EntityFrameworkCore.SqlServer.HierarchyId.targets
diff --git a/src/EFCore.SqlServer.NTS/build/net8.0/Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite.targets b/src/EFCore.SqlServer.NTS/build/net10.0/Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite.targets
similarity index 100%
rename from src/EFCore.SqlServer.NTS/build/net8.0/Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite.targets
rename to src/EFCore.SqlServer.NTS/build/net10.0/Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite.targets
diff --git a/src/EFCore.Sqlite.NTS/build/net8.0/Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite.targets b/src/EFCore.Sqlite.NTS/build/net10.0/Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite.targets
similarity index 100%
rename from src/EFCore.Sqlite.NTS/build/net8.0/Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite.targets
rename to src/EFCore.Sqlite.NTS/build/net10.0/Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite.targets
diff --git a/src/EFCore.Tasks/EFCore.Tasks.nuspec b/src/EFCore.Tasks/EFCore.Tasks.nuspec
index 6784ee35bb6..bd751d9589b 100644
--- a/src/EFCore.Tasks/EFCore.Tasks.nuspec
+++ b/src/EFCore.Tasks/EFCore.Tasks.nuspec
@@ -17,7 +17,7 @@
-
+
diff --git a/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props b/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props
index e8f715a54ab..23bf020eb75 100644
--- a/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props
+++ b/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props
@@ -1,7 +1,7 @@
- <_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">net8.0
+ <_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">net10.0
<_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">net472
<_EFCustomTasksAssembly>$([MSBuild]::NormalizePath($(MSBuildThisFileDirectory), '..\tasks\$(_TaskTargetFramework)\$(MSBuildThisFileName).dll'))
publish
diff --git a/src/EFCore.Tools/EFCore.Tools.csproj b/src/EFCore.Tools/EFCore.Tools.csproj
index 1bd9cc8930a..b0101fdbb97 100644
--- a/src/EFCore.Tools/EFCore.Tools.csproj
+++ b/src/EFCore.Tools/EFCore.Tools.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.0
+ $(DefaultNetCoreTargetFramework)
Microsoft.EntityFrameworkCore.Tools
$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec
true
@@ -49,6 +49,7 @@ Update-Database
+
diff --git a/src/EFCore.Tools/EFCore.Tools.nuspec b/src/EFCore.Tools/EFCore.Tools.nuspec
index 63e6d2b0154..0048a2705c0 100644
--- a/src/EFCore.Tools/EFCore.Tools.nuspec
+++ b/src/EFCore.Tools/EFCore.Tools.nuspec
@@ -4,7 +4,7 @@
$CommonMetadataElements$
-
+
@@ -21,8 +21,8 @@
-
-
-
+
+
+
diff --git a/src/EFCore.Tools/tools/EntityFrameworkCore.psm1 b/src/EFCore.Tools/tools/EntityFrameworkCore.psm1
index c8eecf1562a..772cc119716 100644
--- a/src/EFCore.Tools/tools/EntityFrameworkCore.psm1
+++ b/src/EFCore.Tools/tools/EntityFrameworkCore.psm1
@@ -1253,7 +1253,7 @@ function EF($project, $startupProject, $params, $applicationArgs, [switch] $skip
$projectAssetsFile = GetCpsProperty $startupProject 'ProjectAssetsFile'
$runtimeConfig = Join-Path $targetDir ($startupTargetName + '.runtimeconfig.json')
$runtimeFrameworkVersion = GetCpsProperty $startupProject 'RuntimeFrameworkVersion'
- $efPath = Join-Path $PSScriptRoot 'netcoreapp2.0\any\ef.dll'
+ $efPath = Join-Path $PSScriptRoot 'net10.0\any\ef.dll'
$dotnetParams = 'exec', '--depsfile', $depsFile
diff --git a/src/EFCore/buildTransitive/net8.0/Microsoft.EntityFrameworkCore.props b/src/EFCore/buildTransitive/net10.0/Microsoft.EntityFrameworkCore.props
similarity index 100%
rename from src/EFCore/buildTransitive/net8.0/Microsoft.EntityFrameworkCore.props
rename to src/EFCore/buildTransitive/net10.0/Microsoft.EntityFrameworkCore.props
diff --git a/src/dotnet-ef/RootCommand.cs b/src/dotnet-ef/RootCommand.cs
index ccaf9da43f2..9bb6ed5f469 100644
--- a/src/dotnet-ef/RootCommand.cs
+++ b/src/dotnet-ef/RootCommand.cs
@@ -167,7 +167,10 @@ protected override int Execute(string[] _)
args.Add(startupProject.RuntimeFrameworkVersion);
}
- args.Add(Path.Combine(toolsPath, "netcoreapp2.0", "any", "ef.dll"));
+#if !NET10_0
+#error Target framework needs to be updated here, as well as in Microsoft.EntityFrameworkCore.Tasks.props and EntityFrameworkCore.psm1
+#endif
+ args.Add(Path.Combine(toolsPath, "net10.0", "any", "ef.dll"));
}
else if (targetFramework.Identifier == ".NETStandard")
{
diff --git a/src/dotnet-ef/dotnet-ef.csproj b/src/dotnet-ef/dotnet-ef.csproj
index 5b3adba1477..fc90ab1d542 100644
--- a/src/dotnet-ef/dotnet-ef.csproj
+++ b/src/dotnet-ef/dotnet-ef.csproj
@@ -78,13 +78,12 @@ dotnet ef database update
-
-
-
-
+
+
+
diff --git a/src/dotnet-ef/dotnet-ef.nuspec b/src/dotnet-ef/dotnet-ef.nuspec
index 0b75e03afb1..fb06d03f276 100644
--- a/src/dotnet-ef/dotnet-ef.nuspec
+++ b/src/dotnet-ef/dotnet-ef.nuspec
@@ -13,9 +13,9 @@
-
-
-
+
+
+
diff --git a/src/ef/AppDomainOperationExecutor.cs b/src/ef/AppDomainOperationExecutor.cs
index a918005b050..f90cc8a8a98 100644
--- a/src/ef/AppDomainOperationExecutor.cs
+++ b/src/ef/AppDomainOperationExecutor.cs
@@ -115,7 +115,4 @@ public override void Dispose()
}
}
}
-#elif NETCOREAPP2_0_OR_GREATER
-#else
-#error target frameworks need to be updated.
#endif
diff --git a/src/ef/Commands/MigrationsBundleCommand.cs b/src/ef/Commands/MigrationsBundleCommand.cs
index 4b6271f279b..d07c940621e 100644
--- a/src/ef/Commands/MigrationsBundleCommand.cs
+++ b/src/ef/Commands/MigrationsBundleCommand.cs
@@ -43,7 +43,7 @@ protected override int Execute(string[] args)
string context;
using (var executor = CreateExecutor(args))
{
- context = (string)executor.GetContextInfo(Context!.Value())["Type"];
+ context = (string)executor.GetContextInfo(Context!.Value())["Type"]!;
}
Reporter.WriteInformation(Resources.BuildBundleStarted);
@@ -86,7 +86,7 @@ protected override int Execute(string[] args)
var globalJson = default(string);
var nugetConfigs = new Stack();
- var searchPath = WorkingDir!.Value();
+ var searchPath = WorkingDir!.Value()!;
do
{
foreach (var file in Directory.EnumerateFiles(searchPath))
@@ -131,7 +131,7 @@ protected override int Execute(string[] args)
var runtime = _runtime!.HasValue()
? _runtime!.Value()!
- : (string)AppContext.GetData("RUNTIME_IDENTIFIER");
+ : (string)AppContext.GetData("RUNTIME_IDENTIFIER")!;
publishArgs.Add("--runtime");
publishArgs.Add(runtime);
diff --git a/src/ef/Commands/ProjectCommandBase.cs b/src/ef/Commands/ProjectCommandBase.cs
index 5c8ab7c978a..02fc113eef7 100644
--- a/src/ef/Commands/ProjectCommandBase.cs
+++ b/src/ef/Commands/ProjectCommandBase.cs
@@ -122,8 +122,6 @@ protected IOperationExecutor CreateExecutor(string[] remainingArguments)
}
}
}
-#elif !NETCOREAPP2_0
-#error target frameworks need to be updated.
#endif
return new ReflectionOperationExecutor(
Assembly!.Value()!,
diff --git a/src/ef/ef.csproj b/src/ef/ef.csproj
index 36f668682e5..bc690085b1c 100644
--- a/src/ef/ef.csproj
+++ b/src/ef/ef.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.0;net472
+ $(DefaultNetCoreTargetFramework);net472
Entity Framework Core Command-line Tools
Exe
false
@@ -29,11 +29,6 @@
-
-
-
-
-
diff --git a/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs b/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs
index cf1241ebfa7..b24acb17753 100644
--- a/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs
+++ b/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs
@@ -920,11 +920,11 @@ public class ManyTypes
public IPAddress?[] NullableIPAddressArray { get; set; } = null!;
public PhysicalAddress?[] NullablePhysicalAddressArray { get; set; } = null!;
- private List _boolReadOnlyCollection = [];
- private List _uInt8ReadOnlyCollection = [];
- private List _int32ReadOnlyCollection = [];
- private List _stringReadOnlyCollection = [];
- private List _ipAddressReadOnlyCollection = [];
+ private readonly List _boolReadOnlyCollection = [];
+ private readonly List _uInt8ReadOnlyCollection = [];
+ private readonly List _int32ReadOnlyCollection = [];
+ private readonly List _stringReadOnlyCollection = [];
+ private readonly List _ipAddressReadOnlyCollection = [];
public IReadOnlyCollection BoolReadOnlyCollection
=> _boolReadOnlyCollection.ToList();
diff --git a/test/EFCore.SqlServer.HierarchyId.Tests/EFCore.SqlServer.HierarchyId.Tests.csproj b/test/EFCore.SqlServer.HierarchyId.Tests/EFCore.SqlServer.HierarchyId.Tests.csproj
index e6d23444287..10addb45d11 100644
--- a/test/EFCore.SqlServer.HierarchyId.Tests/EFCore.SqlServer.HierarchyId.Tests.csproj
+++ b/test/EFCore.SqlServer.HierarchyId.Tests/EFCore.SqlServer.HierarchyId.Tests.csproj
@@ -14,6 +14,6 @@
-
+