YSOD Could not load file or assembly CMS.DataEngine - after Kentico 11.0.0 upgrade to Kentico 12 SP1


Just finished upgrading Kentico 11.0.0 with MVC, to Kentico 12 SP1 using https://docs.kentico.com/k12sp/installation/upgrading-to-kentico-12

No issues during upgrade.

Kentico CMS is coming up fine on local IIS and Azure app.

MVC site came up fine on local IIS.

But staging MVC site is showing this error in Azure app:

Server Error in '/' Application. Could not load file or assembly 'CMS.DataEngine, Version=, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

enter image description here

asked on Stack Overflow Apr 4, 2020 by joym8

3 Answers


Had to delete old files when publishing

Visual Studio publish dialog


Backup your Kentico CMS published version's media folder before doing this. That is where media library files are stored. Database only contains a reference. Once published and you confirm CMS is up, you will see a yellow exclamation mark next to every image in media library application. Restore the folder from backup so that Media Library files get synced up.

answered on Stack Overflow Apr 4, 2020 by joym8 • edited Apr 23, 2020 by joym8

I've found that several DLLs from kentico 11 were left in the bin folder and that was the reason for this error while VS project compiled successfully without any issue: DLLs list

Once I deleted them all started working fine and the website loaded successfully.

answered on Stack Overflow Apr 26, 2020 by Miriam Zusin • edited Jun 20, 2020 by Community

I have the same error. The Lib folder was exist inside the folder of the solution with file explorer, but unlike the previous version (Kentico 11), when I have performed the upgrade, the Lib folder was not under the solution in visual studio! I have added the folder in visual studio under the solution with all the DLL and XML files from Lib folder. I have perform "clean solution", build all the projects and published it. Now it works.

answered on Stack Overflow May 13, 2020 by idan

User contributions licensed under CC BY-SA 3.0