SaaS CMS has officially launched! Learn more now.

Error when synchronizing a model with an property of type XForm



I am working on an upgrade of a site to Episerver CMS 11.x and getting a strange error when the BackingTypeResolver is synchronizing models.

[NotSupportedException: Specified method is not supported.]
EPiServer.DataAbstraction.Internal.BackingTypeResolver.get_XForm() +28

Peeking into the code, this method surely throws a NotImplemented exception. The question is why this is happening though. I have added the Episerver.XForms nuget package and compilation of the solution does not have any problems.

I cannot find any information about breaking changes that could cause this. Anyone that has seen this or have a clue of why it´s happening?
Sep 11, 2018 15:29

Have you added the nuget package EPiServer.XForms (it has been broken out to its own package)?

Sep 11, 2018 18:07

Yes, the Episerver.XForms package is added and from what I can see of the fusion logs, the Episerver.XForms assembly is loading correctly. I can see how the XForms assembly tries to override the BackingTypeResolver but this does not seem to happen for me. Not sure if it´s related to how the IOC inititialization is done. The project uses StructureMap initialization direcly but I cannot see what should be causing the error. Will continue trying to resolve it today, but suggestions are welcome :)

Sep 13, 2018 11:39

I finally found the error. The assembly was marked as non-scannable in the configuration, so the autoinjection to the IOC was never done due to this. Adding an sample of how the configuration looked like if someone else encounters this:

<episerver.framework updateDatabaseSchema="true">
<scanAssembly forceBinFolderScan="true">
<add assembly="*" />
<remove assembly="EPiServer.XForms" />

Sep 13, 2018 16:00
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.