October 24th, 2024

Upgrade Your Windows Forms .NET Projects to the Latest .NET Version for Enhanced Security

Shyam Gupta
Senior Software Engineer

Each release of .NET introduces a host of new features and bug fixes that enhance both performance and security. To leverage these benefits both service and desktop application developers must upgrade their applications to the latest .NET versions. Just like other developers wanting to take advantage of the latest .NET enhancements, we are updating our design-time support policy. This update will enhance the safety of the Visual Studio WinForms design-time experience and motivate WinForms developers to update their applications for improved security.  However, updating this policy will mean we will no longer support designing Forms in projects targeting older, unsupported .NET versions. This means developers too will need to update their projects to supported .NET runtimes in order to design their forms in Visual Studio. 

It is Time to Upgrade!

Upgrading the WinForms Designer and your applications to newer .NET versions not only enhances security but also improves design-time reliability and performance by leveraging the enhancements available in those .NET versions and referenced NuGet packages. We strongly recommend keeping your applications updated with the latest .NET versions. 

Beginning with the VS 17.12 Preview 3 release, the WinForms Designer will automatically check your project’s target .NET version. If it falls below the minimum supported .NET or .NET LTS version, you will receive a notification displayed prominently in an InfoBar. This feature will keep you informed about your project’s compatibility, allowing easy access to a list of .NET versions and their support status.

Screenshot of Windows Forms .NET Designer displaying the new InfoBar.

Future Support for WinForms Designer with respect to .NET Runtimes

Each time a .NET LTS release reaches its end of support, Visual Studio will update the WinForms Out-of-Process Designer minimum supported version to that LTS release. For example, when .NET 6 LTS goes out of support in November 2024, the following Visual Studio release, 17.13, will update the designer to have .NET 6 as the minimum supported version. Consequently, projects targeting .NET versions below 6, such as .NET Core 3.1 and .NET 5, will no longer load in the Designer. Hence, we highly recommend upgrading your application to the latest .NET release to remain compatible with Visual Studio 17.13 or newer versions. You can use Designer in Visual Studio 17.12 to migrate. For more information refer to VS Product Life Cycle and Servicing wiki.  

Under this policy, each time .NET ships a new LTS release, the WinForms Designer will update our minimum .NET version supported to the previous .NET LTS.  Why the previous LTS? We recognize that enterprises may have some delay in getting upgrades completed, and we don’t want to break them. We will, however, continue to present the InfoBar to developers informing them that they are targeting an out of support .NET release. When developers try to load a project targeting below the WinForms Designer minimum supported version, users will be presented with an error message informing them that the WinForms Designer requires a newer version of .NET.   

The following table outlines the WinForms Designer support policy going forward. While it currently focuses on .NET 6 and .NET 8, the same pattern will apply to future .NET LTS releases.

.NET LTS Release End of support (E) WinForms Designer support policy for next VS release after (E)
6.0 Nov 2024 – Designer will support projects targeting .NET 6.0 and newer versions.

– Versions below 6.0 will not be supported.

8.0 Nov 2026 – Projects targeting .NET 8.0 and newer versions will be supported.

– Versions below 8.0 will not be supported.

As .NET 8 reaches end-of-support, we will promptly upgrade the Designer process to require at least .NET 8 in the subsequent Visual Studio release. This proactive approach ensures that you stay current with your projects while maintaining compatibility with the WinForms Designer in newer Visual Studio versions. You can learn more about the .NET release lifecycle in this wiki.

Important Note: These changes will only impact the design-time experience of the WinForms Designer. At runtime, all .NET versions will continue to function as they do now.

Conclusion and call for feedback

In today’s rapidly evolving landscape, prioritizing security in software development is essential, and it requires the commitment of all developers. The WinForms Designer team is dedicated to improving security, but we need your collaboration to ensure that projects remain updated with the latest .NET versions. While this may feel like a significant change, it is a necessary step toward enhancing the security of the WinForms Designer and your applications.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

Author

Shyam Gupta
Senior Software Engineer

Developer working on Microsoft Visual Studio Windows Forms Designer.