Kentico 8 Upgrade Compilation Issue- Type initializer threw an exception

Will Wiencek asked on May 7, 2014 13:20

I just upgraded my development environment from Kentico 7 to Kentico 8 using the upgrade utility. After cleaning up some custom API calls, I am getting the following error:

The pre-application start initialization method PreInit on type CMS.DataEngine.CMSHttpApplication threw an exception with the following error message: The type initializer for 'CMS.Core.ModuleEntryManager' threw an exception..

I've done some searching to find common causes in .Net for this issue and what I've seen so far references missing AppSettings nodes in web.config. I've done a compare on the .integrated config and our web.config and have added all the missing settings to no avail. Is there something else specific I should be looking for?

Recent Answers


Joshua Adams answered on May 7, 2014 13:51

Does your bin folder include that reference? Also if it does, does the version number match the other dlls in your bin folder?

1 votesVote for this answer Mark as a Correct answer

Will Wiencek answered on May 7, 2014 14:04

Both .dlls are there, everything is version 8.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 7, 2014 19:16

If you have a brand new install of v8 you might compare web.config files to see if there are any missing references in there as well. I've found the easiest thing to do is compare a fresh install to the upgraded version (file system, web.config, etc.)

0 votesVote for this answer Mark as a Correct answer

Will Wiencek answered on May 9, 2014 07:29

I found it. I was missing some .dlls in the BIN directory (sibling of CMS and Lib in the new structure). If anyone else encounters the issue, force a run without debugging and the ASP error page will point you in the right direction.

0 votesVote for this answer Mark as a Correct answer

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