diff --git a/src/EFCore.Abstractions/EFCore.Abstractions.csproj b/src/EFCore.Abstractions/EFCore.Abstractions.csproj index 1872b15a402..310247199ff 100644 --- a/src/EFCore.Abstractions/EFCore.Abstractions.csproj +++ b/src/EFCore.Abstractions/EFCore.Abstractions.csproj @@ -2,7 +2,7 @@ Provides abstractions and attributes that are used to configure Entity Framework Core - $(DefaultNetCoreTargetFramework) + $(NetMinimum) 3.6 Microsoft.EntityFrameworkCore.Abstractions Microsoft.EntityFrameworkCore diff --git a/src/EFCore.Tasks/EFCore.Tasks.csproj b/src/EFCore.Tasks/EFCore.Tasks.csproj index 8d91c9a30b7..7a74c476184 100644 --- a/src/EFCore.Tasks/EFCore.Tasks.csproj +++ b/src/EFCore.Tasks/EFCore.Tasks.csproj @@ -1,7 +1,7 @@  - $(NetCurrent);$(NetFrameworkToolCurrent) + $(NetMinimum);$(NetFrameworkToolCurrent) MSBuild tasks for Entity Framework Core projects. Microsoft.EntityFrameworkCore.Tasks Microsoft.EntityFrameworkCore @@ -11,7 +11,7 @@ true $(MSBuildThisFileDirectory)..\..\rulesets\EFCore.noxmldocs.ruleset $(TargetsForTfmSpecificContentInPackage);AddPackContent - tasks + false @@ -71,13 +71,15 @@ - - - + + + + + - - + + @@ -85,8 +87,11 @@ TargetPath="/%(TfmSpecificPackageFile.PackagePath)/%(Filename)%(Extension)" TargetFramework="$(TargetFramework)" Condition="'$(IncludeSymbols)' == 'true'" /> - - + + diff --git a/src/EFCore.Tasks/Tasks/Internal/OperationTaskBase.cs b/src/EFCore.Tasks/Tasks/Internal/OperationTaskBase.cs index ea38e491b56..085ee05530a 100644 --- a/src/EFCore.Tasks/Tasks/Internal/OperationTaskBase.cs +++ b/src/EFCore.Tasks/Tasks/Internal/OperationTaskBase.cs @@ -198,18 +198,15 @@ protected override string GenerateCommandLineCommands() args.Add(runtimeFrameworkVersion); } -#if NET472 -#elif NET11_0 -#else -#error Target framework needs to be updated here -#endif + var packageRoot = Path.Combine( + Path.GetDirectoryName(typeof(OperationTaskBase).Assembly.Location)!, + "..", + ".."); args.Add( Path.Combine( - Path.GetDirectoryName(typeof(OperationTaskBase).Assembly.Location)!, - "..", - "..", + packageRoot, "tools", - "net11.0", + "net", "ef.dll")); args.AddRange(AdditionalArguments); diff --git a/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props b/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props index 1d0add9c50e..8e96fccc3ab 100644 --- a/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props +++ b/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.props @@ -2,8 +2,8 @@ - <_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">net11.0 - <_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">net472 + <_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">net + <_TaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">netframework <_EFCustomTasksAssembly>$([MSBuild]::NormalizePath($(MSBuildThisFileDirectory),'..\tasks\$(_TaskTargetFramework)\$(MSBuildThisFileName).dll')) publish publish diff --git a/src/EFCore.Tools/EFCore.Tools.csproj b/src/EFCore.Tools/EFCore.Tools.csproj index caa33c35568..1f5100b6411 100644 --- a/src/EFCore.Tools/EFCore.Tools.csproj +++ b/src/EFCore.Tools/EFCore.Tools.csproj @@ -50,9 +50,9 @@ Update-Database - - - + + + diff --git a/src/EFCore.Tools/tools/EntityFrameworkCore.psm1 b/src/EFCore.Tools/tools/EntityFrameworkCore.psm1 index 09ec3ae237e..bd3dfc51311 100644 --- a/src/EFCore.Tools/tools/EntityFrameworkCore.psm1 +++ b/src/EFCore.Tools/tools/EntityFrameworkCore.psm1 @@ -1306,8 +1306,7 @@ function EF($project, $startupProject, $params, $applicationArgs, [switch] $skip $projectAssetsFile = GetCpsProperty $startupProject 'ProjectAssetsFile' $runtimeConfig = Join-Path $targetDir ($startupTargetName + '.runtimeconfig.json') $runtimeFrameworkVersion = GetCpsProperty $startupProject 'RuntimeFrameworkVersion' - # TODO: Remove TFM from the path, issue #37473 - $efPath = Join-Path $PSScriptRoot 'net10.0\any\ef.dll' + $efPath = Join-Path $PSScriptRoot 'net\ef.dll' $dotnetParams = 'exec', '--depsfile', $depsFile diff --git a/src/dotnet-ef/RootCommand.cs b/src/dotnet-ef/RootCommand.cs index fa70430b979..3f053ece357 100644 --- a/src/dotnet-ef/RootCommand.cs +++ b/src/dotnet-ef/RootCommand.cs @@ -150,11 +150,7 @@ protected override int Execute(string[] _) args.Add(startupProject.RuntimeFrameworkVersion); } -#if !NET10_0 -#error Target framework needs to be updated here, as well as in Microsoft.EntityFrameworkCore.Tasks.props and EntityFrameworkCore.psm1 -#endif - // TODO: Remove TFM from the path, issue #37473 - args.Add(Path.Combine(toolsPath, "net10.0", "any", "ef.dll")); + args.Add(Path.Combine(toolsPath, "net", "ef.dll")); } else if (targetFramework.Identifier == ".NETStandard") { diff --git a/src/dotnet-ef/dotnet-ef.csproj b/src/dotnet-ef/dotnet-ef.csproj index 9ca666878d1..3aac33cc088 100644 --- a/src/dotnet-ef/dotnet-ef.csproj +++ b/src/dotnet-ef/dotnet-ef.csproj @@ -69,12 +69,11 @@ - - - - + + +