Skip to content

Conversation

@eerhardt
Copy link
Member

This is especially important for EF integrations where we need to explicitly reference the 10 version of EF when targeting net10.

cc @DamianEdwards

This is especially important for EF integrations where we need to explicitly reference the 10 version of EF when targeting net10.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12500

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12500"

Copy link
Contributor

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 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.0 to the AllTargetFrameworks property
  • 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

@eerhardt
Copy link
Member Author

@sebastienros @DamianEdwards - This is ready for review.

Copy link
Member

@sebastienros sebastienros left a 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.
Copy link
Member

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

Copy link
Member Author

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";
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

@AndriySvyryd is that expected?

Copy link
Member

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.

@eerhardt eerhardt merged commit c95b045 into dotnet:main Oct 30, 2025
582 of 585 checks passed
@eerhardt eerhardt deleted the TargetNet10 branch October 30, 2025 19:14
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 30, 2025
@eerhardt
Copy link
Member Author

/backport to release/13.0

@github-actions
Copy link
Contributor

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18970980187

@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants