Skip to content

Commit 2ac1627

Browse files
CopilotAndriySvyryd
authored andcommitted
Document breaking changes: EF tools .NET Framework support and Design dependency (#5281)
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
1 parent 34c995c commit 2ac1627

2 files changed

Lines changed: 58 additions & 6 deletions

File tree

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

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,56 @@ This page documents API and behavior changes that have the potential to break ex
1919
| **Breaking change** | **Impact** |
2020
|:--------------------------------------------------------------------------------------------------------------- | -----------|
2121
| [Sync I/O via the Azure Cosmos DB provider has been fully removed](#cosmos-nosync) | Medium |
22+
| [EF tools packages no longer reference Microsoft.EntityFrameworkCore.Design](#ef-tools-no-design-dep) | Low |
2223

23-
### Medium-impact changes
24+
## Medium-impact changes
2425

2526
<a name="cosmos-nosync"></a>
2627

27-
#### Sync I/O via the Azure Cosmos DB provider has been fully removed
28+
### Sync I/O via the Azure Cosmos DB provider has been fully removed
2829

2930
[Tracking Issue #37059](https://github.com/dotnet/efcore/issues/37059)
3031

31-
##### Old behavior
32+
#### Old behavior
3233

3334
Synchronous I/O via the Azure Cosmos DB provider has been unsupported since EF 9.0 ([note](/ef/core/what-is-new/ef-core-9.0/breaking-changes#cosmos-nosync)); calling any sync I/O API - like `ToList` or `SaveChanges` threw an exception, unless a special opt-in was configured. When the opt-in was configured, sync I/O APIs worked as before, causing the provider to perform "sync-over-async" blocking against the Azure Cosmos DB SDK, which could result in deadlocks and other performance issues.
3435

35-
##### New behavior
36+
#### New behavior
3637

3738
Starting with EF Core 11.0, EF now always throws when a synchronous I/O API is called. There is no way to opt back into using sync I/O APIs.
3839

39-
##### Why
40+
#### Why
4041

4142
Synchronous blocking on asynchronous methods ("sync-over-async") is highly discouraged, and can lead to deadlock and other performance problems. Since the Azure Cosmos DB SDK only supports async methods, so does the EF Cosmos provider.
4243

43-
##### Mitigations
44+
#### Mitigations
4445

4546
Convert your code to use async I/O APIs instead of sync I/O ones. For example, replace calls to `SaveChanges()` with `await SaveChangesAsync()`.
47+
48+
## Low-impact changes
49+
50+
<a name="ef-tools-no-design-dep"></a>
51+
52+
### EF tools packages no longer reference Microsoft.EntityFrameworkCore.Design
53+
54+
[Tracking Issue #37739](https://github.com/dotnet/efcore/issues/37739)
55+
56+
#### Old behavior
57+
58+
Previously, the `Microsoft.EntityFrameworkCore.Tools` and `Microsoft.EntityFrameworkCore.Tasks` NuGet packages had a dependency on `Microsoft.EntityFrameworkCore.Design`.
59+
60+
#### New behavior
61+
62+
Starting with EF Core 11.0, the `Microsoft.EntityFrameworkCore.Tools` and `Microsoft.EntityFrameworkCore.Tasks` NuGet packages no longer have a dependency on `Microsoft.EntityFrameworkCore.Design`.
63+
64+
#### Why
65+
66+
There was no hard dependency on the code in `Microsoft.EntityFrameworkCore.Design`, and this dependency was causing issues when using the latest `Microsoft.EntityFrameworkCore.Tools` with projects targeting older frameworks.
67+
68+
#### Mitigations
69+
70+
If your project relies on `Microsoft.EntityFrameworkCore.Design` being brought in transitively through the tools packages, add a direct reference to it in your project:
71+
72+
```xml
73+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="11.0.0" PrivateAssets="all" />
74+
```

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ EF Core 9 targets .NET 8. This means that existing applications that target .NET
3333
| [SqlFunctionExpression's nullability arguments' arity validated](#sqlfunctionexpression-nullability) | Low |
3434
| [`ToString()` method now returns empty string for `null` instances](#nullable-tostring) | Low |
3535
| [Shared framework dependencies were updated to 9.0.x](#shared-framework-dependencies) | Low |
36+
| [EF tools no longer support .NET Framework projects](#ef-tools-no-netfx) | Low |
3637

3738
## High-impact changes
3839

@@ -333,6 +334,28 @@ The matching dependency versions contain the latest security fixes and using the
333334

334335
Change your app to target net9.0 to get the previous behavior.
335336

337+
<a name="ef-tools-no-netfx"></a>
338+
339+
### EF tools no longer support .NET Framework projects
340+
341+
[Tracking Issue #37745](https://github.com/dotnet/efcore/issues/37745)
342+
343+
#### Old behavior
344+
345+
Previously, the EF Core tools (`dotnet-ef` CLI and Package Manager Console tools) worked with projects targeting .NET Framework.
346+
347+
#### New behavior
348+
349+
Starting with EF Core 9.0, the EF Core tools no longer work with projects targeting .NET Framework. The tools produce an error when the startup project targets .NET Framework.
350+
351+
#### Why
352+
353+
The current version of EF Core tools works with all supported EF Core versions and there are no longer any supported EF Core versions that work on .NET Framework.
354+
355+
#### Mitigations
356+
357+
Update your project to target .NET (e.g., .NET 8 or later). If your project currently targets .NET Framework, see the [porting guide](/dotnet/core/porting/) for information on migrating to .NET.
358+
336359
## Azure Cosmos DB breaking changes
337360

338361
Extensive work has gone into making the Azure Cosmos DB provider better in 9.0. The changes include a number of high-impact breaking changes; if you are upgrading an existing application, please read the following carefully.

0 commit comments

Comments
 (0)