expressappframework-401264-migration-to-net-port-an-application-to-higher-version.md
Assemblies, demos, and project templates for XAF ASP.NET Core Blazor and WinForms (.NET Core) v25.2 target .NET 8. For more information, review the following breaking change ticket: .NET 8 and .NET Framework 4.6.2 are minimally supported Target Frameworks for DevExpress libraries in v24.2. Install Visual Studio 17.0 or higher to use .NET.
This topic explains how to update your existing XAF solution to .NET.
Important
Copy and save the current versions of all csproj files before porting.
Make sure that your XAF WinForms application can be migrated to .NET and all the required components are installed on your machine. For details, refer to the following topic: Migration to .NET from .NET Framework in v25.2+.
Follow the steps below to port the application:
In the Solution Explorer, unload all projects.
Replace the existing code in each csproj file with the following:
In the new code, replace the “MySolution” placeholder with your project’s root namespace in the <RootNamespace> element and with the project’s name in the <ProjectReference> element.
If you reference other projects or NuGet packages, copy corresponding <ProjectReference> elements from the old version of the csproj files and paste them into the new version.
If your projects require other resources (for example, PNG images), include them in <EmbeddedResource> elements.
Reload all projects.
In the Program.cs file, comment the following line:
In the App.config file, remove the `` element and add the code below to <appSettings>:
Optional. Enable the latest framework settings at the top of the Main method:
Rebuild the solution.
If you port an EF 6-based application, you also need to move to EF Core because .NET applications do not support EF 6. This move may require additional changes to your application. For more information, refer to the following article: Port from EF6 to EF Core.
Note
Refer to the following topic for information on how to deploy the ported application: Deploy .NET Applications.
If you are migrating from .NET 6 to .NET 8+, you can use the Project Converter to simplify your migration (the Project Converter automatically retargets your projects to .NET 8 and updates third-party NuGet packages in projects that depend on DevExpress libraries).
See Also
XAF ASP.NET Core Blazor and WinForms (.NET Core) assemblies target .NET 5