Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/EFCore.Tasks/EFCore.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<None Include="**/*.props;**/*.targets"
Pack="true"
PackagePath="%(RecursiveDir)%(Filename)%(Extension)" />
<None Include="lib/**/*" Pack="true" PackagePath="lib/" />
</ItemGroup>

<ItemGroup>
Expand All @@ -56,7 +55,6 @@

<ItemGroup>
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
<ProjectReference Include="..\EFCore.Design\EFCore.Design.csproj" ReferenceOutputAssembly="true" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
Expand Down
Empty file removed src/EFCore.Tasks/lib/net10.0/_._
Empty file.
9 changes: 1 addition & 8 deletions src/EFCore.Tools/EFCore.Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ Update-Database
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ef\ef.csproj" />
<!-- Referencing a stub project so that this project can continue targeting NetMinimum but expose a
package dependency to the Design package that targets the current TFM only. -->
<ProjectReference Include="..\stubs\EFCore.Design.csproj" ReferenceOutputAssembly="true" />
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand All @@ -51,12 +48,8 @@ Update-Database

<Target Name="AddPackContent" DependsOnTargets="GenerateContent">
<ItemGroup>
<TfmSpecificPackageFile Include="lib/**/*" PackagePath="lib/" />
<TfmSpecificPackageFile Include="tools/**/*" PackagePath="tools/" />
<TfmSpecificPackageFile Include="$(IntermediateOutputPath)*.psd1" PackagePath="tools/" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/net472/*" PackagePath="tools/net472/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/x86/$(Configuration)/net472/*" PackagePath="tools/net472/win-x86" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/ARM64/$(Configuration)/net472/*" PackagePath="tools/net472/win-arm64" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.dll" PackagePath="tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.runtimeconfig.json" PackagePath="tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.pdb" PackagePath="tools/$(TargetFramework)/any" />
Expand Down
Empty file removed src/EFCore.Tools/lib/net8.0/_._
Empty file.
21 changes: 3 additions & 18 deletions src/EFCore.Tools/tools/EntityFrameworkCore.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1286,24 +1286,8 @@ function EF($project, $startupProject, $params, $applicationArgs, [switch] $skip

if ($targetFramework -in '.NETFramework')
{
$platformTarget = GetPlatformTarget $startupProject
if ($platformTarget -eq 'x86')
{
$exePath = Join-Path $PSScriptRoot 'net472\win-x86\ef.exe'
}
elseif ($platformTarget -eq 'ARM64')
{
$exePath = Join-Path $PSScriptRoot 'net472\win-arm64\ef.exe'
}
elseif ($platformTarget -in 'AnyCPU', 'x64')
{
$exePath = Join-Path $PSScriptRoot 'net472\any\ef.exe'
}
else
{
throw "Startup project '$($startupProject.ProjectName)' has an active platform of '$platformTarget'. Select " +
'a different platform and try again.'
}
throw "Startup project '$($startupProject.ProjectName)' targets framework '.NETFramework'. The Entity Framework Core Package " +
'Manager Console Tools don''t support .NET Framework projects. Consider updating the project to target .NET.'
}
elseif ($targetFramework -eq '.NETCoreApp')
{
Expand All @@ -1322,6 +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'

$dotnetParams = 'exec', '--depsfile', $depsFile
Expand Down
12 changes: 10 additions & 2 deletions src/dotnet-ef/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/dotnet-ef/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,13 @@
<value>NativeAOT support is experimental and can change in the future.</value>
</data>
<data name="NETCoreApp1StartupProject" xml:space="preserve">
<value>Startup project '{startupProject}' targets framework '.NETCoreApp' version '{targetFrameworkVersion}'. This version of the Entity Framework Core .NET Command-line Tools only supports version 2.0 or higher. For information on using older versions of the tools, see https://go.microsoft.com/fwlink/?linkid=871254</value>
<value>Startup project '{startupProject}' targets framework '.NETCoreApp' version '{targetFrameworkVersion}'. This version of the Entity Framework Core .NET Command-line Tools only supports version 10.0 or higher.</value>
Comment thread
AndriySvyryd marked this conversation as resolved.
</data>
<data name="NETFrameworkStartupProject" xml:space="preserve">
<value>Startup project '{startupProject}' targets framework '.NETFramework'. The Entity Framework Core .NET Command-line Tools don't support .NET Framework projects. Consider updating the project to target .NET.</value>
</data>
<data name="NETStandardStartupProject" xml:space="preserve">
<value>Startup project '{startupProject}' targets framework '.NETStandard'. There is no runtime associated with this framework, and projects targeting it cannot be executed directly. To use the Entity Framework Core .NET Command-line Tools with this project, add an executable project targeting .NET Core or .NET Framework that references this project, and set it as the startup project using --startup-project; or, update this project to cross-target .NET Core or .NET Framework. For more information on using the Entity Framework Tools with .NET Standard projects, see https://go.microsoft.com/fwlink/?linkid=2034781</value>
<value>Startup project '{startupProject}' targets framework '.NETStandard'. There is no runtime associated with this framework, and projects targeting it cannot be executed directly. To use the Entity Framework Core .NET Command-line Tools with this project, add an executable project targeting .NET Core references this project, and set it as the startup project using --startup-project; or, update this project to cross-target .NET Core or .NET Framework. For more information on using the Entity Framework Tools with .NET Standard projects, see https://go.microsoft.com/fwlink/?linkid=2034781</value>
Comment thread
AndriySvyryd marked this conversation as resolved.
Outdated
</data>
<data name="NoBuildDescription" xml:space="preserve">
<value>Don't build the project. Intended to be used when the build is up-to-date.</value>
Expand Down
28 changes: 4 additions & 24 deletions src/dotnet-ef/RootCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,38 +109,17 @@ protected override int Execute(string[] _)
var targetFramework = new FrameworkName(startupProject.TargetFrameworkMoniker!);
if (targetFramework.Identifier == ".NETFramework")
{
executable = Path.Combine(
toolsPath,
"net472",
startupProject.PlatformTarget == "x86"
? "win-x86"
: "any",
"ef.exe");
throw new CommandException(
Resources.NETFrameworkStartupProject(startupProject.ProjectName));
}
else if (targetFramework.Identifier == ".NETCoreApp")
{
if (targetFramework.Version < new Version(2, 0))
if (targetFramework.Version < new Version(5, 0))
{
throw new CommandException(
Resources.NETCoreApp1StartupProject(startupProject.ProjectName, targetFramework.Version));
}
Comment thread
AndriySvyryd marked this conversation as resolved.
Comment thread
AndriySvyryd marked this conversation as resolved.

var targetPlatformIdentifier = startupProject.TargetPlatformIdentifier!;
if (targetPlatformIdentifier.Length != 0
&& !string.Equals(targetPlatformIdentifier, "Windows", StringComparison.OrdinalIgnoreCase))
{
executable = Path.Combine(
toolsPath,
"net472",
startupProject.PlatformTarget switch
{
"x86" => "win-x86",
"ARM64" => "win-arm64",
_ => "any"
},
"ef.exe");
}

executable = "dotnet";
args.Add("exec");
args.Add("--depsfile");
Expand Down Expand Up @@ -174,6 +153,7 @@ protected override int Execute(string[] _)
#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"));
}
else if (targetFramework.Identifier == ".NETStandard")
Expand Down
4 changes: 1 addition & 3 deletions src/dotnet-ef/dotnet-ef.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,12 @@

<!-- PDBs are currently always included as PackAsTool packages don't support excluding them.
https://github.com/dotnet/sdk/issues/53226 -->
<!-- TODO: Remove TFM from the path, issue #37473 -->
<Target Name="AddEfProjectOutput">
<ItemGroup>
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.dll" PackagePath="tools/$(TargetFramework)/any/tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.runtimeconfig.json" PackagePath="tools/$(TargetFramework)/any/tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.pdb" PackagePath="tools/$(TargetFramework)/any/tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/net472/*" PackagePath="tools/$(TargetFramework)/any/tools/net472/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/x86/$(Configuration)/net472/*" PackagePath="tools/$(TargetFramework)/any/tools/net472/win-x86" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/ARM64/$(Configuration)/net472/*" PackagePath="tools/$(TargetFramework)/any/tools/net472/win-arm64" />
</ItemGroup>
</Target>

Expand Down
145 changes: 0 additions & 145 deletions src/ef/AppDomainOperationExecutor.cs

This file was deleted.

8 changes: 0 additions & 8 deletions src/ef/Commands/MigrationsBundleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ protected override void Validate()
}
}

#if !NET
protected override int Execute(string[] args)
=> throw new CommandException(Resources.VersionRequired("6.0.0"));
#else
protected override int Execute(string[] args)
{
string? version;
Expand Down Expand Up @@ -78,7 +74,6 @@ protected override int Execute(string[] args)
};
programGenerator.Initialize();

// TODO: We may not always have access to TEMP
var tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Directory.CreateDirectory(tempDirectory);
try
Expand Down Expand Up @@ -174,8 +169,6 @@ protected override int Execute(string[] args)
publishArgs.Add(configuration!);
}

publishArgs.Add("--disable-build-servers");

var exitCode = Exe.Run("dotnet", publishArgs, directory, handleOutput: Reporter.WriteVerbose);
if (exitCode != 0)
{
Expand Down Expand Up @@ -218,5 +211,4 @@ protected override int Execute(string[] args)

return base.Execute(args);
}
#endif
}
Loading
Loading