ComponentOne .NET 6 Support Updates for 2022
ComponentOne controls fully support .NET 6 across each platform as of our 2021 v3 release. Part of this support process has included porting all .NET Framework components to be based upon .NET 6 for WinForms and WPF. The release of these controls has been staggered every update for the past two years (since we first started to migrate controls to .NET 5). In this update below, we share the current status of each ComponentOne WinForms and WPF control for .NET 6, which final controls we plan to port in 2022 and demonstrate how you can work around using .NET Framework controls in .NET 6 applications.
.NET 6 WinForms Controls Status
Below is the list of WinForms controls supported in .NET 6, as of May 2022, and which controls are still planned for later in the year.
.NET 6 Support Ready |
.NET 6 Support Planned |
Not Planned |
|
|
|
.NET 6 WPF Controls Status
Below is the list of WPF controls supported in .NET 6, as of May 2022, and which controls are still planned for later in the year.
.NET 6 Support Ready |
.NET 6 Support Planned |
Not Planned |
|
|
|
.NET 6 Design-Time Support
For .NET 6 we've prioritized runtime functionality for the controls. The design-time editors in Visual Studio have to be reimplemented for .NET 6 because the designer is now based upon .NET Core. As a result, the level of design-time support will be different for .NET 6 versus .NET Framework controls. We are continuing to fill this gap with each release.
How to Use .NET Framework Controls in a .NET 6 Application
There may be situations where you can use an older .NET Framework library in a .NET 6 application. There are a few issues to consider:
- The .NET 6 Visual Studio designer was rewritten using .NET Core, so it doesn't support older designers based on .NET Framework.
- The final published application will depend on .NET Framework, which may not be ideal in all use cases.
- For ComponentOne controls, in most scenarios, you will not be able to mix .NET 6, and .NET Framework controls due to shared namespaces.
The second issue has no workaround, but there are ways to work around the first issue. If you don't need to use the designer in Visual Studio, then you need not worry - the .NET Framework controls fully work at runtime in .NET 6. However, to use the designer, you can add a .NET Framework Project file to your solution that includes your .NET 6 Project and then link the Form files from the .NET 6 to the .NET Framework project. Then open the Forms in the Framework project to get the working designer, and saved changes are automatically available for your actual .NET 6 project.
Here are the steps to creating the .NET Framework project and linking the Form:
- Open your solution that contains the .NET 6 project
- Add new WinForms .NET Framework Project
- Remove the Form.cs file if it will conflict with your .NET 6 form class
- Right-click .NET Framework Project and select Add - Existing Item
- Browse to the Form file (i.e., Form.cs) from your .NET 6 project and select - Add As Link
This should also link all related files like x.Designer and x.Resx. Next, you must add references to the same ComponentOne .NET Framework libraries in both the .NET 6 and .NET Framework projects.
Now, you can open your Form from within the .NET Framework project to take advantage of the designer to build your UI.
You can download the sample using C1TopicBar. Finally, you may need to adjust a few things manually:
- If the ComponentOne control tries to create a .resx file at design time, you'll need to add that file to the .NET 6 project, remove it from .NET Framework, and re-link it.
- In the code behind your form, add "using System.Windows.Forms;" (plus any other libraries you will need) to the top of the file. These are not required in .NET 6 but will be needed for backward compatibility.
If you are using any unplanned controls and want to see them in .NET 6, let us know in the comments. We have received some feedback already, and more feedback helps us prioritize which controls to migrate next.