cancel
Showing results for 
Search instead for 
Did you mean: 

DLL error The type initializer 'AFIPinvoice.AFIPparser' threw an exception

ArielALBANO1982
Level 2

Hi all, we are using a C# DLL to parse a pdf invoice to a collection. In Dev an QA environment the parser works fine, but in producción we are getting this error:

"ERROR: Internal : Could not execute code stage because exception thrown by code stage: The type initializer 'AFIPinvoice.AFIPparser' threw an exception".

The prod environment is an exact copy of the QA environment, and we've checked that the .net libraries versions and the DLL files in prod are exactly the same as the files in DEV and QA.

The dll file is located in the BP folder in prod.

¿Do you have any clue about what could be the cause of this issue?

Thanks!
20964.png



------------------------------
Ariel Albano
------------------------------
1 REPLY 1

ewilson
Staff
Staff
Hello @ArielALBANO1982,

I'd suggest wrapping your initialization code in a try...catch block and then checking to see if there are additional details in the exception message or possibly an inner exception message. Something I've seen on various occasions is a mismatch in some of the lower-level DLL versions (ex. System.Memory.dll, System.Buffers.dll, etc). 

Also, if your DLL is placed in the Blue Prism Automate folder, you don't need to provide the fully qualified path for the DLL declaration. The Automate folder is the root execution folder of the Automate.exe so it will automatically look for your DLL there.

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------