Skip to content

Conversation

@AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Nov 19, 2025

Fixes #37201

Description

The tools switched to target net10.0, but they need to be compatible with the older supported TFMs.

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants