mirror of https://github.com/abpframework/abp.git
2 changed files with 68 additions and 0 deletions
@ -0,0 +1,67 @@ |
|||
# ABP Version 10.0 Migration Guide |
|||
|
|||
This document is a guide for upgrading ABP v9.x solutions to ABP v10.0. There are some changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application. |
|||
|
|||
## Open-Source (Framework) |
|||
|
|||
### Upgraded to .NET 10.0 |
|||
|
|||
We've upgraded ABP to .NET 10.0, so you need to move your solutions to .NET 10.0 if you want to use ABP 10.0. You can check Microsoft’s [Migrate from ASP.NET Core 9.0 to 10.0](https://learn.microsoft.com/en-us/aspnet/core/migration/90-to-100) documentation, to see how to update an existing ASP.NET Core 9.0 project to ASP.NET Core 10.0. |
|||
|
|||
### Razor Runtime Compilation Obsolete |
|||
|
|||
We removed the Razor Runtime Compilation support. |
|||
|
|||
For more information, you can check the [Razor Runtime Compilation Obsolete](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete) page. |
|||
|
|||
### IActionContextAccessor Obsolete |
|||
|
|||
We removed the `IActionContextAccessor` from dependency injection. |
|||
|
|||
> We are not using `IActionContextAccessor` in ABP core framework and modules. |
|||
|
|||
See [IActionContextAccessor Obsolete](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/iactioncontextaccessor-obsolete) for more information. |
|||
|
|||
### Add `BLOB Storing Memory Provider` module. |
|||
|
|||
In this version, we added the `BLOB Storing Memory Provider` module for unit testing purposes. |
|||
|
|||
See the [BLOB Storing Memory Provider](https://github.com/abpframework/abp/blob/dev/docs/en/framework/infrastructure/blob-storing/memory.md) document for more information. |
|||
|
|||
### Always use `MapStaticAssets` |
|||
|
|||
Provious, the `MapStaticAssets` has performance problems if there are too many static files. and we will use `StaticFileMiddleware` to serve the static files in development mode. NET 10.0 has fixed this problem. We will always use `MapStaticAssets` to serve the static files. |
|||
|
|||
See [Static file serving performance issues](https://github.com/dotnet/aspnetcore/issues/59673) for more information. |
|||
|
|||
### C# 14 overload resolution with span parameters |
|||
|
|||
NET Core will redirect `array.Contains` extension method to `MemoryExtensions.Contains`, This will cause `MongoDB.Driver` to be unable to translate `IQueryable<T>`, If you are using `array.Contains` in your code, you should use following code to avoid this problem. |
|||
|
|||
> Only array has this problem, other types are not affected. eg List<T>, HashSet<T>, etc. |
|||
|
|||
> MongoDB.Driver will be fixed in the future. |
|||
|
|||
```csharp |
|||
M((array, num) => array.Contains(num)); // fails, binds to MemoryExtensions.Contains |
|||
M((array, num) => ((IEnumerable<int>)array).Contains(num)); // ok, binds to Enumerable.Contains |
|||
M((array, num) => array.AsEnumerable().Contains(num)); // ok, binds to Enumerable.Contains |
|||
M((array, num) => Enumerable.Contains(array, num)); // ok, binds to Enumerable.Contains |
|||
``` |
|||
|
|||
See the [C# 14 overload resolution with span parameters](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/csharp-overload-resolution#recommended-action) for more information. |
|||
|
|||
### Failure Retry Policy for InboxProcessor |
|||
|
|||
In this version, we added a failure retry policy(`AbpEventBusBoxesOptions/InboxProcessorRetryBackoffFactor`) to the `AbpEventBusBoxesOptions`. |
|||
|
|||
* `InboxProcessorFailurePolicy`: The policy to handle the failure of the inbox processor. Default value is `Retry`. Possible values are: |
|||
* `Retry`: The current exception and subsequent events will continue to be processed in order in the next cycle. |
|||
* `RetryLater`: Skip the event that caused the exception and continue with the following events. The failed event will be retried after a delay that doubles with each retry, starting from the configured `InboxProcessorRetryBackoffFactor` (e.g., 10, 20, 40, 80 seconds). The default maximum retry count is 10 (configurable). Discard the event if it still fails after reaching the maximum retry count. |
|||
* `Discard`: The event that caused the exception will be discarded and will not be retried. |
|||
* `InboxProcessorRetryBackoffFactor`: The initial retry delay factor (double) used when `InboxProcessorFailurePolicy` is `RetryLater`. The retry delay is calculated as: `delay = InboxProcessorRetryBackoffFactor × 2^retryCount`. Default value is `10`. |
|||
|
|||
See the [Add failure retry policy to InboxProcessor](https://github.com/abpframework/abp/pull/23563) PR for more information. |
|||
|
|||
## PRO |
|||
|
|||
Loading…
Reference in new issue