.NET Support
- 5 minutes to read
.NET is an open-source development platform with high-performance runtime. It is maintained by Microsoft and the .NET community on GitHub.
Prerequisites
The table below shows the versions of DevExpress WinForms Controls that support .NET.
DevExpress Version | .NET Core 3.0 | .NET Core 3.1 (LTS) | .NET 5.0 | .NET 6 (LTS) | .NET 7 | .NET 8 (Latest) |
---|---|---|---|---|---|---|
v23.1-v24.1 (current) | ||||||
v22.2-v22.2 | ||||||
v21.2-v22.1 | ||||||
v20.1-v21.1 |
Prerequisites to build .NET applications:
- Download .NET
- Visual Studio 2022 v17.0+ (.NET 6 design-time and runtime support)
Tip
Are you currently using .NET Framework and ready to transition to .NET 6+ or move your solutions to the Cloud?
We recognize that migrating/rewriting legacy applications can be a significant undertaking. If you are ready to transition to newer versions of .NET or move your solution to the cloud, be sure to review the following highly rated help topics:
- .NET Upgrade Assistant Tool
- Start your cloud journey with Azure App Service
- ASP.NET to ASP.NET Core tutorial playlist on YouTube
- Reliable Web App pattern (RWA) on GitHub (a guidance for building around existing apps without the need for a complete rewrite)
Create .NET Applications
Use the DevExpress Project Template Gallery to create projects with DevExpress UI controls (v22.2+) that target .NET 6+.
Version 22.2+ installs local DevExpress NuGet packages on your machine. You can add these packages to your existing .NET projects from the NuGet Package Manager:
- In the Solution Explorer, right-click the project and select Manage NuGet Packages from the drop-down menu.
Select the DevExpress Local package source.
- Install the DevExpress.Win.Design NuGet package. See How to Install NuGet Packages (NuGet Package Manager).
Open the project properties. Ensure that the Target OS setting is set to
Windows
.<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net7.0-windows</TargetFramework> <!-- CHECK THIS LINE --> <Nullable>enable</Nullable> <UseWindowsForms>true</UseWindowsForms> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup> <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="22.2.3" /> </ItemGroup> </Project>
- Build the project.
You can also add DevExpress NuGet packages to an existing project from a remote feed:
- Obtain your NuGet Feed URL. You need to be logged in as a registered DevExpress customer and have an active WinForms/DXperience/Universal subscription.
- Register the NuGet Feed.
- Install the DevExpress.Win.Design NuGet package.
- Build the project.
Note
Install the DevExpress.Win package if you do not need design-time features.
Read the following article for detailed information and frequently asked questions: Design-Time Support for DevExpress WinForms Controls for .NET.
Upgrade .NET Framework Applications
To convert a .NET Framework project to .NET, launch the converter tool from the Visual Studio menu.
Select the .NET version and click “Convert”.
This converter uses the .NET try-convert tool to upgrade your project, and replaces DevExpress assembly references with NuGet package references. After the conversion completes, the .NET Core Migration tool displays the output of the try-convert tool.
Note
The converter tool requires the .NET 5.0 SDK.
Note
.NET introduced a new default font for Windows Forms controls. As a side effect, upgrading an application to .NET 5+ may break layouts of standard Forms and UserControls with the AutoScaleMode
property set to Font. To overcome this issue, replace standard Forms and UserControls with their DevExpress counterparts, or set their AutoScaleMode
property to DPI
.
See also: How to port desktop applications from .NET Framework to .NET
Deploy .NET Applications
Self-Contained Deployment
Your applications can be deployed in two different ways:
Framework-dependent deployment - the application does not include .NET. The application may not work on a client machine if the correct .NET version is not installed.
Self-contained deployment - .NET is a part of the application package. The disadvantages of this technique are that you must select target platforms in advance, and distribute larger deployment packages.
You can deploy self-contained applications in Visual Studio or call the following command in the command-line interface:
dotnet publish -c Release -r win10-x64 --self-contained true
See the following topic for more information: .NET application publishing overview.
Single-File Applications
You can publish .NET applications as one executable file. To do this, run the command prompt, navigate to the application folder, and call the following command:
dotnet publish -r win10-x64 -c Release -p:PublishSingleFile=true
See the following blog post for more information: WinForms - Single-File Applications With .NET Core 3.
Limitations
- Global .NET platform limitations, not specific to DevExpress controls.
- Reports - .NET Limitations
- The Layout Assistant Extension is not available.
- The data source dropdown with existing data sources is not available for Repository Items in the Grid Control’s Designer. Use the Properties window to bind a repository item to a data source at design time.
- DevExpress WinForms MVVM Templates are not available in .NET 6+ applications.
- Design-Time Layout Templates are not available.
- It is not possible to drag-drop
BarItems
from the Customization Form to bars at design time. Use the Bar Manager Designer to customize toolbars at design time. - The Properties panel in DevExpress Designers does not display events.
- The Document Viewer‘s smart tag in Visual Studio Designer does not display reports in the Document Source drop-down menu. You should specify the DocumentSource property in code.