Fix HelixTestRunner using the wrong version of dotnet-ef - #65676
Merged
Conversation
Member
Author
|
/azp list |
Member
Author
|
/azp run aspnetcore-template-tests-pr |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Member
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a CI issue where the Helix test runner was installing the latest stable version of dotnet-ef instead of the prerelease version bundled in the Helix correlation payload. During preview periods, dotnet tool install defaults to stable versions, causing template tests to use an incompatible older version (10.0.3) instead of the expected 11.0.0-preview version.
Changes:
- Added the
--prereleaseflag to thedotnet tool install dotnet-efcommand in the Helix test runner, ensuring the bundled prerelease nupkg is installed during preview periods.
Member
Author
Member
Author
4 tasks
The Microsoft.EntityFrameworkCore.Tools package depends on Microsoft.EntityFrameworkCore.Design >= 8.0.0 (minimum). NuGet resolves this transitive dependency to 8.0.0, which is incompatible with the 11.0.0-preview.3 Abstractions assembly (the AbstractionsStrings.ArgumentIsEmpty method signature changed). This causes MissingMethodException when running dotnet-ef migrations on template projects. Fix by adding an explicit PackageReference for Design with the correct version in the template csproj.in files, so the transitive dependency from Tools is overridden with a version-matched package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
Member
|
@AndriySvyryd --- please take a look |
AndriySvyryd
approved these changes
Mar 6, 2026
Member
Author
|
/backport to release/10.0 |
Contributor
|
Started backporting to |
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We attempt to bundle the latest version of
dotnet-efwith the Helix correlation payload, so that the tests can use it. However,dotnet-efwas never actually getting restored, and we had no check for whether or not it existed on disk when we tried to bundle it with the Helix payload. As a result,dotnet tool installwould just use the latest stable version on nuget.org. This just started causing some template tests to fail because there was recently an API breaking change in EF that's incompatible with the latest stabledotnet-ef.Additionally, some of the templates explicitly depend on
Microsoft.EntityFrameworkCore.Tools, which referencesMicrosoft.EntityFrameworkCore.Design >= 8.0.0. That 8.0.0 version was the one actually being restored - we just never noticed because until now, it was compatible with the latest version of the package. But there was a breaking change in 11, which surfaced the fact that we were using the 8.0.0 version. The fix for that is to add an explicitPrivateAssets=allPackageRef to the current version ofMicrosoft.EntityFrameworkCore.Design.