When it comes to converting .NET customizations, this is the at-a-glance view of extensibility point compatibility between DW9 and DW10:
| Extensibility point | Compatibility |
|---|---|
| Notifications | 95% |
| Providers (e.g. PriceProvider, ProductIndexSchemaExtender, CheckoutHandler) | 100% |
| Content modules (ContentModule) and settings (ContentModules_Edit.aspx) | 100%/0% |
| DynamicWeb API | 85% |
| Dynamicweb.Ecommerce API | 90% |
| DynamicWeb Modules API (Forms, Datalist, etc.) | 99% |
| DynamicWeb Core APIs (Caching, Database, Logging, etc.) | 95% |
The following extensibility points are obsolete and must be replaced:
| Extensibility point | Reason | Replacement |
|---|---|---|
| UI Extensibility (Ribbonbar, Dashboard, Statistics, etc.) | Dependent on DW9 UI | New UI Extensibility |
| Item type editors (Items) | Dependent on DW9 UI | New UI Extensibility |
| FieldTypeProviders | Dependent on DW9 UI | New UI Extensibility |
| Pipeline-dependent notifications (Dynamicweb.Notifications.Standard.Application) | .NET 4 runtime related | IPipeline and Middleware |
| Web.config | .NET 4 runtime related | IPipeline and Middleware |
| Global.asax and Default.aspx | .NET 4 runtime related | IPipeline and Middleware |
Upgrading from .NET Framework 4.8 to .NET 10 projects
There are several strategies for migrating C# code to .NET 10, many of which can be found in official Microsoft docs. A quick and effective strategy is simply creating new .NET 10 projects (.csproj style) for each legacy project in the solution and copying code one or more files at a time.
This strategy will work especially well for smaller projects:
- Change project to .NET 10
- Remove usage of System.Web - replace with Dynamicweb.Context
- Isolate or delete incompatible code
- Change to use PackageReference format for C# projects
- Update NuGet dependencies to latest 10.X.X packages
- Remove all usage of deprecated DynamicWeb APIs
- Remove all usage of deprecated .NET APIs
- Remove unused dependencies
Changing the project to .NET 10
There are two ways to change your project to .NET 10:
- Create a new project (RECOMMENDED)
- Open the folder with the current project in VS Code
- Rename .csproj to .csproj.old
- Open a terminal in the project folder
- Create a new project 'dotnet new classlib -f net10.0'
- Add required packages
- dotnet add package dynamicweb
- dotnet add package dynamicweb.ecommerce
- Build the project - 'dotnet build'
- Use the .NET Upgrade Assistant
- Go to the .NET Upgrade Assistant page
- Follow the guide
For DW10 customizations, target .NET 10 directly.