Skip to content

Commit f80eca0

Browse files
CopilotAndriySvyryd
authored andcommitted
Add medium-impact breaking change note for Microsoft.Data.SqlClient 7.0 upgrade (#5305)
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
1 parent 6b59bef commit f80eca0

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This page documents API and behavior changes that have the potential to break ex
2222
| **Breaking change** | **Impact** |
2323
|:--------------------------------------------------------------------------------------------------------------- | -----------|
2424
| [Sync I/O via the Azure Cosmos DB provider has been fully removed](#cosmos-nosync) | Medium |
25+
| [Microsoft.Data.SqlClient has been updated to 7.0](#sqlclient-7) | Medium |
2526
| [EF Core now throws by default when no migrations are found](#migrations-not-found) | Low |
2627
| [`EFOptimizeContext` MSBuild property has been removed](#ef-optimize-context-removed) | Low |
2728
| [EF tools packages no longer reference Microsoft.EntityFrameworkCore.Design](#ef-tools-no-design-dep) | Low |
@@ -52,6 +53,36 @@ Synchronous blocking on asynchronous methods ("sync-over-async") is highly disco
5253

5354
Convert your code to use async I/O APIs instead of sync I/O ones. For example, replace calls to `SaveChanges()` with `await SaveChangesAsync()`.
5455

56+
<a name="sqlclient-7"></a>
57+
58+
### Microsoft.Data.SqlClient has been updated to 7.0
59+
60+
#### Old behavior
61+
62+
EF Core 10 used [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) 6.x, which included Azure/Entra ID authentication dependencies (such as `Azure.Core`, `Azure.Identity`, and `Microsoft.Identity.Client`) in the core package.
63+
64+
#### New behavior
65+
66+
EF Core 11 now depends on [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) 7.0. This version removes Azure/Entra ID (formerly Azure Active Directory) authentication dependencies from the core package. If your application uses Entra ID authentication (for example, `ActiveDirectoryDefault`, `ActiveDirectoryInteractive`, `ActiveDirectoryManagedIdentity`, or `ActiveDirectoryServicePrincipal`), you must now install the [`Microsoft.Data.SqlClient.Extensions.Azure`](https://www.nuget.org/packages/Microsoft.Data.SqlClient.Extensions.Azure/) package separately.
67+
68+
In addition, `SqlAuthenticationMethod.ActiveDirectoryPassword` has been marked as obsolete.
69+
70+
For more details, see the [Microsoft.Data.SqlClient 7.0 release notes](https://github.com/dotnet/SqlClient/blob/main/release-notes/7.0/7.0.0.md).
71+
72+
#### Why
73+
74+
This change was made in [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) to reduce dependency bloat for applications that don't use Azure authentication, which is especially beneficial for containerized deployments and local development.
75+
76+
#### Mitigations
77+
78+
If your application uses Entra ID authentication with SQL Server, add a reference to the `Microsoft.Data.SqlClient.Extensions.Azure` package in your project:
79+
80+
```xml
81+
<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="7.0.0" />
82+
```
83+
84+
No code changes are required beyond adding this package reference. If you use `SqlAuthenticationMethod.ActiveDirectoryPassword`, migrate to a modern authentication method such as `ActiveDirectoryDefault` or `ActiveDirectoryInteractive`.
85+
5586
## Low-impact changes
5687

5788
<a name="migrations-not-found"></a>

0 commit comments

Comments
 (0)