XRM-OSS / Xrm-Templating-Language

A domain specific language for Dynamics CRM allowing for easy text template processing
https://xrmadventuretime.com/tag/xtl/
MIT License
22 stars 8 forks source link

System.BadImageFormatException / System.IO.DirectoryNotFoundException #15

Closed andreaPorini closed 5 years ago

andreaPorini commented 5 years ago

Hi DigitalFlow,

I have registered 2 step on PreCreate for the Xrm.Oss.XTL.Templating.XTLProcessor plugin but when I try to save the destination entity record I get one of the following two error message:

To try to solve the problem I tried the following things without success:

Can you please help me?

Let me know if you need further information.

Regards, Andrea

DigitalFlow commented 5 years ago

Hi @andreaPorini,

is it possible that you have some other plugins with early bindings running before the XTL plugins execute? I think I already saw these exceptions on those cases. This is due to the types not being available in the XTL assemblies, it seems as each plugin has to serialize and deserialize the target record.

If you really do have plugins with early bindings running before, you could try to not set the target as early bound object, but to use ToEntity() when setting it in the context.

Kind Regards, Florian

DigitalFlow commented 5 years ago

Hi @andreaPorini,

did you solve your issues?

Kind Regards, Florian

andreaPorini commented 5 years ago

Hi @DigitalFlow,

thanks for the feedback.

I confirm that the problem has been solved. There was one CWAs that caused the problem, in fact in another environment everything worked correctly.

Thanks again.

Kind Regards, Andrea