-
Notifications
You must be signed in to change notification settings - Fork 761
Target net10.0 in client integrations #12500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is especially important for EF integrations where we need to explicitly reference the 10 version of EF when targeting net10.
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12500Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12500" |
There was a problem hiding this 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 adds .NET 10.0 target framework support and updates package versions to .NET 10.0 RC2. The changes enable the Aspire project to support multi-targeting across .NET 8.0, 9.0, and 10.0.
- Adds
net10.0to theAllTargetFrameworksproperty - Defines preview version properties for .NET 10.0 packages (EF Core, ASP.NET Core, Runtime extensions)
- Maps preview version properties to specific packages for net10.0 target framework
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/Versions.props | Adds net10.0 to target frameworks and defines preview version properties for .NET 10.0 RC2 packages |
| Directory.Packages.props | Maps preview version properties to package references for net10.0 target framework |
|
@sebastienros @DamianEdwards - This is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we are lucky there are no breaking changes that require specific changes. (apart from the test)
| private static void AssertCorrectConnectionString(string expectedConnectionString, string actualConnectionString) | ||
| { | ||
| #if NET10_0_OR_GREATER | ||
| // In .NET 10, the connection string may have additional parameters appended, so we check the start only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In .NET 10 or in EF 10. nit but just want to be sure what changed, not asking for changing the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EF changed, as far as I can tell. It started adding the app name to the connection string. I think dotnet/efcore#36548 caused it.
| public class AspireSqlServerEFCoreSqlClientExtensionsTests | ||
| { | ||
| private const string ConnectionString = "Data Source=fake;Database=master;Encrypt=True"; | ||
| private const string ConnectionString = "Data Source=fake;Initial Catalog=master;Encrypt=True"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it just nicer or doesn't it work otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test breaks. EF is changing Database to Initial Catalog somewhere. So I updated these strings to match so the test doesn't break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndriySvyryd is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be some normalizing that SqlClient does. Functionally, there's no difference.
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18970980187 |
This is especially important for EF integrations where we need to explicitly reference the 10 version of EF when targeting net10.
cc @DamianEdwards