Strange error after registering data protection custom control

Danny Winbourne asked on November 17, 2021 17:29

I am working on adding some custom code for the Data Protection Module. I want to use a Custom "Erasure Configuration Control" so using the below code:

DataProtectionControlsRegister.Instance.RegisterErasureConfigurationControl("~/CMSModules/MYSITE/ContactDataEraserConfiguration.ascx");

However, when I run my CMS Site with the below enabled, I get the following error:

Could not load file or assembly 'CMS.DataEngine, Version=11.0.0.0, 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)

My custom module is in its own class library and works fine when I comment out the above line. Other custom code related to the Data Protection Module works.

I am on MVC Module, and on version 12.0.65.

I have checked the references in the main bin directory, as well as the custom module, and they match and are using the exact same version.

What's strange is that this site was never version 11 (was built starting on version 12+) - so I am not sure where the reference to 11.0.0 comes from?

Correct Answer

Danny Winbourne answered on November 17, 2021 17:40

Issue resolved. It wasn't the CMS.DataEngine reference that was the issue, rather CMS.UIControls - that had an outdated reference, and updating fixed issue.

0 votesVote for this answer Unmark Correct answer

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