Kentico 11 site seems to have lost sight of mscorlib.dll

Don Rea asked on December 2, 2021 22:50

I am running a Kentico 11 basic install on Windows 10/IIS 10 for training purposes. All was well for several days, until quite suddenly Visual Studio 2022 started marking most object references in .cs files in the CMS project as errors. (These are files that not precompiled, but get compiled and cached at run time.) Hovering over the marked strings I see such messages as Predefined type 'System.Object' is not defined or imported. When I try to view any page of the site I am presented with an IIS error screen with the message Could not load file or assembly 'System.Collections' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) Other projects in the solution seem OK. At any rate, they look OK in VS and they build without error.

I've tried changing the .NET version reference to other installed versions, with no effect. I've tried manually adding a reference to mscorlib.dll, with no effect. I've tried reinstalling .NET 4.8 (the version it was referring to to start with), with no effect. I am not aware of any change to the system that would have caused this; to my perception it was sudden and inexplicable. This system is not being used by anyone else, and I am not using it for anything but this training.

I've exhausted my limited expertise. What should I try next?

Recent Answers

vasu yerramsetti answered on December 3, 2021 05:02

Not sure currently Kentico 11 will work properly with Visual Studio 2022. As per Kentico documentation, Kentico 11 supports Visual Studio 2015 or 2017 with Microsoft .NET Framework 4.6 or 4.7.

You can try with Kentico 12 installation for training purpose.

0 votesVote for this answer Mark as a Correct answer

Don Rea answered on December 6, 2021 22:59

Neither upgrading to Kentico 12 nor downgrading to VS 2019 had any effect. Deleting the site files and database and reinstalling Kentico 11 seems to have solved the problem for now. I guess this will be one of those problems where I never do learn what caused it.

0 votesVote for this answer Mark as a Correct answer

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