Skip to content

Commit

Permalink
Revert ef6.ext to .NET Core 3.0
Browse files Browse the repository at this point in the history
This, in theory, will improve compatibility. With this, we compile against the lowest possible target framework, and try to execute on the exact same target framework as the user's project.
  • Loading branch information
bricelam committed Oct 25, 2019
1 parent 49e721d commit 9c2cae3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/NuGet/EntityFramework/EntityFramework.NuGet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<ItemGroup>
<NuspecProperty Include="Configuration=$(Configuration)" />
<NuspecProperty Include="DefaultNetCoreTargetFramework=$(DefaultNetCoreTargetFramework)" />
<NuspecProperty Include="NeutralLanguage=$(NeutralLanguage)" />
<NuspecProperty Include="MicrosoftCSharpVersion=$(MicrosoftCSharpVersion)" />
<NuspecProperty Include="SystemCodeDomVersion=$(SystemCodeDomVersion)" />
Expand Down
6 changes: 3 additions & 3 deletions src/NuGet/EntityFramework/EntityFramework.NuGet.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<file src="../../../artifacts/bin/ef6/$Configuration$/net40/ef6.pdb" target="tools/net40/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/net45/ef6.exe" target="tools/net45/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/net45/ef6.pdb" target="tools/net45/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/$DefaultNetCoreTargetFramework$/ef6.dll" target="tools/$DefaultNetCoreTargetFramework$/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/$DefaultNetCoreTargetFramework$/ef6.pdb" target="tools/$DefaultNetCoreTargetFramework$/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/$DefaultNetCoreTargetFramework$/ef6.runtimeconfig.json" target="tools/$DefaultNetCoreTargetFramework$/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/netcoreapp3.0/ef6.dll" target="tools/netcoreapp3.0/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/netcoreapp3.0/ef6.pdb" target="tools/netcoreapp3.0/any/" />
<file src="../../../artifacts/bin/ef6/$Configuration$/netcoreapp3.0/ef6.runtimeconfig.json" target="tools/netcoreapp3.0/any/" />
<file src="../../../artifacts/bin/ef6/x86/$Configuration$/net40/ef6.exe" target="tools/net40/win-x86/" />
<file src="../../../artifacts/bin/ef6/x86/$Configuration$/net40/ef6.pdb" target="tools/net40/win-x86/" />
<file src="../../../artifacts/bin/ef6/x86/$Configuration$/net45/ef6.exe" target="tools/net45/win-x86/" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GenerateRuntimeConfigurationFiles>True</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<Import Project="..\EntityFramework.props" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\EntityFramework.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\build\netcoreapp3.0\EntityFramework.props" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\build\netcoreapp3.0\EntityFramework.targets" />
</Project>
2 changes: 1 addition & 1 deletion src/NuGet/EntityFramework/tools/EntityFramework6.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ function EF6($project, $startupProject, $workingDir, $params)
$projectAssetsFile = GetCpsProperty $project 'ProjectAssetsFile'
$runtimeConfig = Join-Path $targetDir ($targetName + '.runtimeconfig.json')
$runtimeFrameworkVersion = GetCpsProperty $project 'RuntimeFrameworkVersion'
$efPath = Join-Path $PSScriptRoot 'netcoreapp3.1\any\ef6.dll'
$efPath = Join-Path $PSScriptRoot 'netcoreapp3.0\any\ef6.dll'

$dotnetParams = 'exec', '--depsfile', $depsFile

Expand Down
7 changes: 6 additions & 1 deletion src/ef6/ef6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net40;net45</TargetFrameworks>
<TargetFrameworks>netcoreapp3.0;net40;net45</TargetFrameworks>
<RootNamespace>System.Data.Entity.Tools</RootNamespace>
<!--
This keeps ef6.exe targeting the default version of .NET Core for netcoreapp3.0,
which maximizes the machines on which this tool will be compatible.
-->
<TargetLatestDotNetRuntime Condition=" '$(IsServicingBuild)' == 'true' ">false</TargetLatestDotNetRuntime>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down

0 comments on commit 9c2cae3

Please sign in to comment.