Skip to content

Conversation

@AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Nov 19, 2025

Fixes #37201

Description

Up to 9.0 EF targeted the lowest supported TFM. In 10.0 we decided to only target the latest one to make the versioning story simpler for users. However, the tools should have continued to target the lowest TFM because they are decoupled from the other NuGet packages and frequently used with older versions.

Customer impact

Exception when trying to use the EF tools on a project targeting net8.0 or net9.0

How found

Customer reported on 10.0.0

Regression

Yes, from 9.0.0. Introduced in #35488

Testing

Tested manually and these are the only parts of EF 10 that are expected to work on net8.0 and net9.0

Risk

Low, only design-time tools are affected by the change.

@AndriySvyryd AndriySvyryd requested a review from Copilot November 19, 2025 18:34
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner November 19, 2025 18:34
Copilot finished reviewing on behalf of AndriySvyryd November 19, 2025 18:37
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

This PR switches the EF Core tools back to targeting .NET 8.0 (from .NET 10.0) on the release/10.0 branch by replacing $(DefaultNetCoreTargetFramework) with $(NetToolMinimum) and $(NetToolCurrent) properties. The changes update project target frameworks and package manifests to reference net8.0 instead of net10.0.

Key changes:

  • Update tool projects to use $(NetToolMinimum) instead of $(DefaultNetCoreTargetFramework)
  • Update hardcoded framework version strings from net10.0 to net8.0 in code and scripts
  • Update NuGet package specifications to use the new MSBuild properties

Reviewed Changes

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

Show a summary per file
File Description
src/ef/ef.csproj Changed TargetFrameworks from $(DefaultNetCoreTargetFramework) to $(NetToolMinimum)
src/dotnet-ef/dotnet-ef.nuspec Updated target paths to use lowercase $targetFramework$ variable; contains a typo on line 19
src/dotnet-ef/dotnet-ef.csproj Changed TargetFramework from $(DefaultNetCoreTargetFramework) to $(NetToolMinimum)
src/dotnet-ef/RootCommand.cs Updated preprocessor directive from NET10_0 to NET8_0 and hardcoded path from net10.0 to net8.0
src/EFCore.Tools/tools/EntityFrameworkCore.psm1 Updated ef.dll path from net10.0 to net8.0
src/EFCore.Tools/EFCore.Tools.csproj Changed TargetFramework from $(DefaultNetCoreTargetFramework) to $(NetToolMinimum)
src/EFCore.Tasks/EFCore.Tasks.nuspec Updated to use $(NetToolCurrent) and $(NetToolMinimum) properties; contains inconsistency on line 20
src/EFCore.Tasks/EFCore.Tasks.csproj Changed TargetFrameworks to use $(NetToolCurrent) and added NuspecProperty entries for both new properties

@AndriySvyryd AndriySvyryd requested a review from artl93 November 21, 2025 16:14
@AndriySvyryd
Copy link
Member Author

cc @artl93

@artl93
Copy link
Member

artl93 commented Nov 21, 2025

Last week we talked about getting more coverage on these scenarios by testing htem ourselves. Do we know if this is the end of targeting concerns?

@AndriySvyryd
Copy link
Member Author

We are tracking test coverage in #17018 and #33136. However, only part of this regression would have been caught as we typically don't use test boxes without the latest .NET SDK

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.

Approved based on the explanation that there was an intentional change that mistakenly included impacting these components. Customer reported regression.

@rbhanda rbhanda added this to the 10.0.2 milestone Nov 25, 2025
@AndriySvyryd AndriySvyryd merged commit f037e98 into release/10.0 Nov 25, 2025
7 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue37201 branch November 25, 2025 18:08
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.

6 participants