A couple of years back, we announced we were dropping support for .NET Core 3.1 to align with Microsoft's support lifecycle for that version of .NET.

Today we are making a similar announcement, a bit more preemptively ๐Ÿ˜‰, for .NET 6.

You can view the detailed .NET support lifecycle which includes all currently and previously supported versions.

The Summary

Let's do the summary first for those who want the answer now ๐Ÿค“ and questions later:

  • Microsoft's support of .NET 6 will reach end-of-life (EOL) in November 2024
  • Kentico's support for Xperience by Kentico solutions running on .NET 6 will also reach EOL in November 2024
  • Customers are encouraged to begin adopting .NET 8 now and all new projects should start on .NET 8
  • We have already updated documentation to recommend .NET 8
  • Xperience by Kentico .NET solution templates are being updated to target .NET 8 by default
  • Starting now, new Xperience by Kentico open source libraries on GitHub will target .NET 8 only
  • Existing libraries will be updated to target .NET 8 only when our support of .NET 6 reaches EOL
  • Xperience by Kentico, as a product, will be updated to target .NET 8 only sometime after .NET 6 EOL, at which point .NET 6 projects will be required to target .NET 8 to apply Refreshes

Microsoft's .NET support lifecycle

Microsoft has documented its .NET support lifecycle for awhile now, and for the past few versions of long term support (LTS) and standard term support (STS) releases things have settled into a familiar and predictable cadence. LTS releases (even numbered, like .NET 6 and .NET 8) are supported for 3 years and STS releases (odd numbered, like .NET 5 and .NET 7) for 18 months.

With the release of .NET 8 in November of 2023 we have a new LTS release, which means the previous LTS release - .NET 6 - will only be supported for an additional 12 months. That's right ๐Ÿง, .NET 6 will no longer be supported after November, 2024.

Kentico's .NET support lifecycle

Because Xperience by Kentico is built on top of .NET, we cannot provide support for a version of the framework Microsoft no longer supports. This means that our support of Xperience by Kentico running on .NET 6 will also end after November, 2024.

Our plan is to always be aligned with Microsoft's .NET support lifecycle to keep things simple for customers, while also ensuring they have a pathway ๐Ÿ›ฃ๏ธ to the next LTS version of .NET.

Thankfully, we already introduced support for .NET 8 back in our November 2024 Refresh, so customers have been able to update existing projects or start new ones on the latest LTS version of .NET for several months.

Strategic adoption

What does all of this mean for you and your Xperience by Kentico solutions ๐Ÿค”?

If you are starting a new Xperience by Kentico project, we recommend you check the Target Framework Moniker (TFM) in your Xperience by Kentico project .csproj file and ensure it's targeting .NET 8. If you are authoring new libraries to support your Xperience projects, those should also target .NET 8.

What if you have an existing Xperience by Kentico project ๐Ÿคจ?

While you could wait for the buzzer and delay updating your project until November 2024, there's really no reason to wait and we recommend updating now ๐Ÿ‘. All existing .NET libraries for Xperience by Kentico that you or your team authors should also update to .NET 8.

As part of our effort to be a modern, evergreen product, we'll be adopting .NET 8 in all of our new open source libraries on GitHub. If this causes a problem for your project, let us know - we want to better understand your hurdles in adopting .NET 8.

Updating to .NET 8

Microsoft has detailed documentation covering the API changes and steps to update between each major version of .NET. There's both .NET 6 to .NET 7 and .NET 7 to .NET 8 documentation. However, much of this documentation covers ASP.NET Core Blazor projects, which have seen quite a bit of evolution over the past few years. For most Xperience by Kentico applications, there are only 3 steps ๐Ÿ‘ and they can jump directly from .NET 6 to .NET 8:

  1. Make sure you have the latest version of the .NET SDK installed. If you are using Visual Studio and it is up-to-date, you'll already have it.

  2. Update your solution's global.json file (if you have one) to use the latest SDK version:

    {
        "sdk": {
            "version": "8.0.100"
        }
    }
    

    Not using a global.json file? Add one to your solution to ensure everyone is using the same version of the .NET SDK ๐Ÿง .

    You can see an example of this in the Community Portal repository.

  3. Update your TFM which can be found in your .csproj files:

    <Project Sdk="Microsoft.NET.Sdk.Web">
    
        <PropertyGroup>
            <TargetFramework>net8.0</TargetFramework>
        </PropertyGroup>
    
    <!-- other MSBuild props and items -->
    
    </Project>
    

    Want to make updating your TFM a simple 1 line change across an entire .NET solution ๐Ÿง ? Try using a Directory.Build.props file to share MSBuild settings across multiple projects!

    You can see an example of this in the Community Portal repository.

  4. Update your Microsoft managed NuGet packages to their .NET 8 versions:

    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.0" />
        <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
        <PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
    </ItemGroup>
    

    Tired of the complexity of maintaining all your package versions across multiple projects in a solution? Try using a single Directory.Packages.props file and NuGet's Central Package Management functionality ๐Ÿง .

    You can see an example of this in the Community Portal repository.

Now, build your solution and resolve any errors or warnings you see (there should be very few from new .NET 8 analyzers, if any).

Is there anything you need to do for your Xperience by Kentico code? Nope, it just works ๐Ÿ™Œ!

If you need any more convincing that now is the right time to update to or start using .NET 8, just read through the 300,000 word .NET 8 performance improvements blog post ๐Ÿ˜ฒ, the large list of new features in .NET 8 or the cool language updates in C# 12 that were released with .NET 8.

We understand there's often more to adopting a new version of .NET than just updating your project. You might need to update the ANCM for hosting ASP.NET Core apps in IIS, the .NET runtime in sensitive server environments (thankfully, modern .NET versions can all be installed side-by-side), or update CI/CD pipelines to support a new version of .NET.

That's why our support of .NET 6 mirrors Microsoft's, so teams have plenty of time to make these changes, not just for Xperience by Kentico but all their other .NET properties.

Wrap Up

Hopefully, both Microsoft's and Kentico's timelines for .NET 6 support are now clear, but just in case the details got lost in the explanation you can follow the link below to the discussion for this blog post and leave a comment ๐Ÿ’ฌ, or reach out to us at [email protected].