update 3.1 to 6 .net core

lawrence whittemore asked on May 11, 2022 20:25

Is there documentation on the best way to update from 3.1 to 6? I tried following MS documentation but want to make sure i didn't miss anything.

Recent Answers


Brenden Kehren answered on May 11, 2022 23:11

Lawrence,

I'd suggest NOT going to .NET 6. I'd suggest only going to .NET 5. The system requirements talk about limitations with .NET 6 which is reason enough to NOT move there quite yet.

Simply put, in your project, update the framework to .NET 5. You may have to reinstall the packages so they reference .NET 5 but that's simple enough to do.

0 votesVote for this answer Mark as a Correct answer

Arjan van Hugten answered on May 12, 2022 09:59

We have several projects running on .NET 6. The limitation that is mentioned is about minimal APIs (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0).

I think moving to .NET 6 is the best choice because of the support (https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core).

The upgrade isn't much effort, following the Microsoft documentation should be enough.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on May 12, 2022 13:13

my concern is support, 6 is Long term to 2024 and 5 support has already ended, Which i really have no idea what that means, but figured going with something with longer support is better in the long run.

.NET 6.0 (LTS) Nov 8, 2021 Nov 12, 2024 .NET 5.0 Nov 10, 2020 May 10, 2022 .NET Core 3.1 (LTS) Dec 3, 2019 Dec 13, 2022

We're not using minimal api so I don't think that will be an issue. I could've sworn i saw someone mention recently to use .net 6 but can't seem to find where it was that it was mentioned.

0 votesVote for this answer Mark as a Correct answer

Sean Wright answered on June 9, 2022 06:19 (last edited on June 9, 2022 06:21)

We have multiple Kentico Xperience 13 sites running on .NET 6 without any issues.

Yes, minimal APIs/startup is not supported with Kentico Xperience 13 (I'm the one who identified those limitations to the support team when upgrading a site), but everything else in ASP.NET Core 6.0 works fine.

.NET 6 brings performance improvements, C# language enhancements, and a faster development workflow with .NET hot reload.

You are correct in understanding that it's better to be on an LTS version of .NET than a non-LTS if the non-LTS version is nearing end-of-support. But besides that, the .NET community is already getting used to yearly upgrades so if you want to stay inline with what's supported by the community I'd recommend upgrading your .NET version within 6 months of each new release. This is the modern .NET way.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.