Upgrade Kentico 12 to Kentico 13

Mr Who asked on July 8, 2021 10:34

Hello guys

Could you write a complete guide to upgrade a project on Kentiko 12 to Kentiko 13? I know there is some information in the documentation, but there is a lot of text and a lot of links. You can just get lost in these links and text. It would be much more convenient to describe the upgrade point by point. could you help me with this please? Maybe there is already a description of the upgrade in a more readable form?

Thank you

Correct Answer

Juraj Ondrus answered on July 8, 2021 11:49

Well, the documentation for upgrading is doing what you are asking for - describing step by step, point to point what needs to be done. It then just depends on you what features are you using or not using and then you can possible skip some steps. It might help also if you will get the details what happens during the upgrade in general, what it does - so you will get some idea what is going on in the background and then the long upgrade documentation will make more sense.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on July 8, 2021 13:21

Having worked with Kentico Xperience since 2008, I can tell you there is no textbook approach for any one upgrade that you can follow. The documentation Juraj references is about as close as you will get. There are far too many factors that can change each step in the process that could be unique to each site. We upgrade a 12-24 or more sites every year and not one of them are the same.

Trial and error is your best bet using the documentation as a guide.

4 votesVote for this answer Mark as a Correct answer

Mr Who answered on July 8, 2021 15:09

Ok, thank you I will try do it :)

0 votesVote for this answer Mark as a Correct answer

Sean Wright answered on July 9, 2021 15:55

If you run into specific problems you can ask about them here and we'll try to help.

However, as Brenden mentioned, there's a lot of variability in the upgrade process from site to site. This is especially true in Kentico 12 MVC -> Kentico Xperience 13.

  • Are you upgrading to ASP.NET Core or staying on .NET Framework?
  • If you are moving to ASP.NET Core, how prevalent is your use of types from System.Web?
  • Do you have any custom integrations?
  • Are you planning to leverage Content Tree based routing in Kentico Xperience 13?
  • ect...
2 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 7, 2021 16:38

Hello Sean Wright and thank you for your willingness to help with this

I guess we are going to stay on .Net framework

I dont know, because after that I've finished upgrade CMS project and MVC project, I got a lot of error deals with assemblies and references. I'm updating the Kentico version for the first time and it is difficult for me to understand.

0 votesVote for this answer Mark as a Correct answer

Sean Wright answered on August 7, 2021 17:06

The upgrade process does require some knowledge of how .NET and the .csproj files work...

The benefit of upgrading from ASP.NET to ASP.NET Core for the MVC project is that you're going to get rid of a lot of those assembly/references errors that are more common in .NET Framework projects.

ASP.NET Core is also the future of .NET and Kentico Xperience (in the next generation of Kentico Xperience, which will be released early next year, ASP.NET Core is the only supported technology).

The upgrade process can be a little complex, depending on your project, however I would strongly advise against staying on .NET 4.x for the MVC application.

You shouldn't have too many issues upgrading the CMS application - and if you do, you can always replace it with a brand new install and copy over any customized files that you might have from your old project.

1 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 7, 2021 20:11

Thank you for your answer

All I did was:

  • I started the hotfix.
  • Installed an upgrade of the content management system.
  • Added Nuget packages to the MVC project.

After that, a lot of incomprehensible errors appeared in both CMS and MVC projects. Moreover, some of them disappear immediately after opening the problem file.

0 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 11, 2021 09:48

I got the follow error:

IoC container cannot be used for service resolution because it was not initialized yet. This means that the application was not properly pre-initialized or yet initialized. Use 'CMS.Core.Service.InitializeContainer' to perform container initialization.

What should I need to do? I know it located in CMSRegistrationSource.cs file, but I dont' quite understand how I can implement it correctly

0 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 11, 2021 13:17 (last edited on August 11, 2021 13:38)

Guys, at the moment I got rid of all the errors during the build. But now when I refresh the page with the admin panel, I get only one word offline. And the second moment, when I try to update the mvc project itself, I get the following error: Couldn't to load the type " Attribute of the Http CMS handler. Routing. Web. Register "from the CMS build". Routing.Web, Version=13.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9". I know that this attribute is not present in version 13, but for some reason he still tries to find it. And I do not know how to fix it. Do you have any ideas?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 11, 2021 15:42

Mr. Who;

A couple things:

  1. You need to upgrade the Kentico Xperience CMS code along with the database, to version 13, using the Kentico Xperience Installation Manager.
  2. Document any errors after the upgrade. Check the log file in the root of the project for more information. If you're upgrade failed, you'll have to find the issue, resolve it and re-run the upgrade process. Your website will also have a file called app_offline.html in the root of the site that will prevent the site from running. (probably what you're now experiencing)
  3. If you had any custom code in your Kentico Xperience CMS code you'll need to review that code and resolve any build/logic errors.
  4. You need to update the package references in your MVC5 application.
  5. You'll need to resolve any build/logic errors in your MVC5 application code.

This is a pretty simple list of things to review. I'd suggest checking out the documentation on how to perform the upgrade in a standard sense, if you haven't read it already.

1 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 11, 2021 15:53 (last edited on August 11, 2021 15:54)

Thank you so much Brenden Kehren

I've just fixed and ran kentico administration project! It's working! But I lose my test license for localhost :) Also I still have the problem with mvc project :) I continue to look for reasons..

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 11, 2021 16:01

When you upgrade, you also need to upgrade your license in the Client Portal to the version you upgraded to.

1 votesVote for this answer Mark as a Correct answer

J P answered on August 11, 2021 16:04

I recommend upgrading the CMS first by excluding any other projects in the solution so they don't generate build errors.

Check that the CMS is correctly referencing the Kentico DLLs, make sure the reference paths are to the lib folder one level above the CMS project. The CMS project shouldn't have any Kentico libraries NuGet references.

Run the upgrade via KIM (after backing everything up)

Delete the bin and obj folders then rebuild, the old DLLs can hang around here and cause you headaches.

Check your source control / documentation for destruction of any custom elements you added to the CMS.

I found some problematic binding redirects were added, these can be found on the project xml file or web.config. Compare them against a fresh install of Kentico 13 of the same version if you need to.

Once you have you CMS building and running ok, then re-include the other projects and update the Kentico Libraries to the same version as your CMS.

And follow the documentation as well although as previously mentioned I'd see it as a guideline because there are so many variables.

1 votesVote for this answer Mark as a Correct answer

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