Skip to content

Comments

[release/10.0] Fix Microsoft.EntityFrameworkCore.Tools for net8.0#37731

Merged
AndriySvyryd merged 4 commits intorelease/10.0from
copilot/add-target-framework-to-tools
Feb 21, 2026
Merged

[release/10.0] Fix Microsoft.EntityFrameworkCore.Tools for net8.0#37731
AndriySvyryd merged 4 commits intorelease/10.0from
copilot/add-target-framework-to-tools

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Fixes #37515

Description
#37207 was intended to allow the EF tools to run for apps targeting net8.0, however the Microsoft.EntityFrameworkCore.Tools NuGet package does not specify a target framework, and it depends on Microsoft.EntityFrameworkCore.Design 10.0.0 which only targets net10.0

Customer impact
Customers can't use Microsoft.EntityFrameworkCore.Tools 10.0.x for apps targeting net8.0, but some tooling that analyzes NuGet packages incorrectly interpret the lack of a target framework specification and select this version even when targeting net8.0.

How found
3 customer reports on 10.0.x

Regression
Not technically, but it completes the fix in #37207 that was for a regression. Also, a change from #33049 is reverted to make the supported TFM explicit

Testing
Tested manually

Risk
Low. The change is mostly reverting to the state the package was for EF 8

Original prompt

This section details on the original issue you should resolve

<issue_title>Microsoft.EntityFrameworkCore.Tools missing target framework</issue_title>
<issue_description>### What problem are you trying to solve?

NuGet package: Microsoft.EntityFrameworkCore.Tools here

The packages does not have a target framework, but it depend on Microsoft.EntityFrameworkCore.Design that only have a target framework .net 10

Could you make Microsoft.EntityFrameworkCore.Tools have the same target framework since some tools assume that no framework mean it works for all frameworks?

Describe the solution you'd like

Microsoft.EntityFrameworkCore.Tools has a target framework.
Link to source code link to this repo instead of https://github.com/dotnet/dotnet</issue_description>

<agent_instructions>Add back the lib/net8.0/_._ file removed in 52f37b3#diff-124e1ace0877746700e5049053b50e061fdeeaa10880199dbeb3078abe429ac5 to be able to specify net8.0 framework.
Make the minimum version for the Microsoft.EntityFrameworkCore.Design dependency 8.0.0, but allow newer major versions</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@AndriySvyryd > The packages does not have a target framework, but it depend on Microsoft.EntityFrameworkCore.Design that only have a target framework .net 10

@HenrikSommer-Energinet I do not understand what you are trying to communicate. Are you experiencing any issues?

Maybe it is related as mine .net thinks I am still targetting .Net9, not 10.

@Levvy055 You need to make sure all your (transitive) dependencies get the same version of Microsoft.CodeAnalysis.* packages (5.0.0). You can override the versions by referencing them directly or by using Central Package Management</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 18, 2026 05:15
…ckage

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot AI changed the title [WIP] Add target framework to Microsoft.EntityFrameworkCore.Tools Add net8.0 target framework to Microsoft.EntityFrameworkCore.Tools package Feb 18, 2026
Copilot AI requested a review from AndriySvyryd February 18, 2026 05:21
Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Update progress by rewriting the PR summary using this template:

Fixes #{number}

**Description**
{Issue description}

**Customer impact**
{How does the reported issue affects customer's app? Are there workarounds?}

**How found**
{Was it customer reported or found during verification? How many customers are affected?}

**Regression**
{Is it a regression from a released version? Which one?}

**Testing**
{How the changes were tested}

**Risk**
{Low/Medium/High, argument why}

… use version 8.0.0, remove ItemGroup from csproj

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 18, 2026

@copilot Update progress by rewriting the PR summary using this template:

Updated PR description with the requested template format.

Copilot AI requested a review from AndriySvyryd February 18, 2026 18:07
@AndriySvyryd AndriySvyryd changed the title Add net8.0 target framework to Microsoft.EntityFrameworkCore.Tools package [release/10.0] Fix Microsoft.EntityFrameworkCore.Tools for net8.0 Feb 18, 2026
@AndriySvyryd AndriySvyryd marked this pull request as ready for review February 18, 2026 21:14
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner February 18, 2026 21:14
Copilot AI review requested due to automatic review settings February 18, 2026 21:14
@AndriySvyryd AndriySvyryd requested a review from artl93 February 18, 2026 21:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the Microsoft.EntityFrameworkCore.Tools NuGet package metadata/content so it’s correctly recognized as supporting net8.0, avoiding incorrect tooling assumptions caused by having no lib/ target framework folder, and loosens the Design dependency from the EF 10 version to a minimum that can work for net8.0 scenarios.

Changes:

  • Add lib/net8.0/_._ to make the package’s supported TFM explicit (net8.0).
  • Update the .nuspec to include lib/** in the packed files.
  • Change the Microsoft.EntityFrameworkCore.Design dependency from $Version$ to a minimum of 8.0.0.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
src/EFCore.Tools/lib/net8.0/. Adds a net8.0 lib placeholder to ensure the package advertises an explicit target framework.
src/EFCore.Tools/EFCore.Tools.nuspec Packs the new lib/ content and lowers the minimum Design dependency version to allow net8-compatible restores.

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customer reported, critical scenario.
Can we do something proactive to make sure this follows the LTS versioning? this seems like it would break often - we need to make sure this is handled as a part of each release, right?

(Approved otherwise)

@AndriySvyryd
Copy link
Member

Customer reported, critical scenario. Can we do something proactive to make sure this follows the LTS versioning? this seems like it would break often - we need to make sure this is handled as a part of each release, right?

Yes, this dependency shouldn't be needed in the first place if the app is referencing Microsoft.EntityFrameworkCore.Design already (common and recommended when using the EF tools). #37739 tracks removing it (it would be technically a breaking change for the apps without this reference)

@roji roji removed their assignment Feb 19, 2026
@AndriySvyryd AndriySvyryd merged commit 0c22a71 into release/10.0 Feb 21, 2026
17 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/add-target-framework-to-tools branch February 21, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants