.NET 7 Support Just Ended, Here's How to Upgrade to .NET 8

Microsoft this week shipped one last minor update for .NET 7, which is no longer supported as of May 14.

Because of the company's scheme of annually alternating .NET releases between Long Term Support (LTS) -- supported for three years -- and Standard Term Support (STS) -- supported for 18 months, .NET 6 is actually still supported until November when.NET 9 will ship. Of course, it wouldn't make sense to "upgrade".NET 7 to .NET 6, so the company is advising developers to move to .NET 8.

.NET Release Cadence
[Click on image for larger view.] .NET Release Cadence (source: Microsoft).

The end of support for .NET 7 means no additional updates or technical support will be offered, or more specifically:

  • Applications that use this version will continue to run.
  • No new security updates will be issued for .NET 7.
  • Continuing to use an unsupported version will expose you to security vulnerabilities.
  • You may not be able to access technical support for .NET 7 applications.

For users using a .NET 7 app, the company's Rahul Bhandari recommended contacting the software developer or vendor who produced it to ask if an updated version that uses .NET 8 is available.

In the company's Upgrade to a new .NET version guidance, developers are advised to:

  • Upgrade development environment: To upgrade to a new .NET version, the .NET SDK is the primary component to install. It includes an updated .NET CLI, build system, and runtime version.
  • Upgrade source code: The only required change to upgrade an app is updating the TargetFramework property in a project file to the newer .NET version.
  • Update continuous integration (CI): CI pipelines follow a similar update process as project files and Dockerfiles. Typically, you can update CI pipelines by changing only version values.
  • Update hosting environment: There are many patterns that are used for hosting applications. If the hosting environment includes the .NET runtime, then the new version of the .NET runtime needs to be installed. On Linux, dependencies need to be installed, however, they typically don't change across .NET versions.

For Visual Studio users, Bhandari noted: "Starting with the June 2024 servicing update for Visual Studio 2022 17.6 and Visual Studio 2022 17.4, the .NET 7 component in Visual Studio will be changed to out of support and optional. Existing installations won't be affected."

Developers need to use the .NET 8 SDK to build .NET 6 or .NET 8 apps to stay supported, he continued, while also noting, "You can use the 'remove out of support components' option to remove .NET 7 from existing Visual Studio installations."

Breaking changes in .NET 8 are detailed in the aptly named Breaking changes in .NET 8 guidance.

Making the whole upgrade process easier is the .NET Upgrade Assistant.

.NET Upgrade Assistant
[Click on image for larger view.] .NET Upgrade Assistant (source: Microsoft).

It supports the C# and Visual Basic languages and these project types:

  • Azure Functions
  • Windows Presentation Foundation
  • Windows Forms
  • Class libraries
  • Console apps
  • .NET Native UWP
  • Xamarin Forms

Instructions to install the .NET Upgrade Assistant can be found in the aptly named Install the .NET Upgrade Assistant guidance. "The .NET Upgrade Assistant can be installed as a Visual Studio extension or as a .NET command-line tool," it says. "When installed as a Visual Studio extension, loaded projects can be upgraded through the context menu. The .NET command-line tool version of the tool provides an interactive step-by-step experience."

.NET 7 did receive two final security-related servicing updates this week, CVE-2024-30045 | .NET Remote Code Execution Vulnerability and CVE-2024-30046 | .NET Denial of Service Vulnerability, also applicable to .NET 8. That means procrastinating developers or enterprises (Bhandari warned of the upcoming end of support back in March) have a little leeway to make the change while their apps are still as secure as those running on .NET 8.

More upgrade guidance is provided in:

More information on this week's "Patch Tuesday" security updates can be found in the May 2024 security and quality rollup post, also covered in sister publication in the article, "2 Zero-Day Flaw Highlights Small Microsoft May Patch".

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube