Exception has been thrown by the target of an invocation
RespondidaHi,
Hope I can get help from someone here regarding this "Exception has been thrown by the target of an invocation".
I created .Net Snippet and I got above error and I discovered that the error was caused by the code below
dim myObjList as new list(of myObj)
I have references to DLL file for myObj, and imports "System.Collections.Generic" for List object. DLL file was created by Microsoft Visual Studio Express 2017 with .Net Framework 3.5. No error is reported when I click "Test compile code" button.
The thing I don't understand is that, the same code run on Universal Function is fine at all.
The Try.. Catch approach does not catch everything for further analysis. The exception occurred straight away without running any code before the line that causing the problem. It seems like the reference to DLL file doesn't work at all.
Have anyone had the similar problem before, any suggestion?
Thanks
-
Comentario oficial
Finally I get the answer from previous post.
The DLL file have to save in C:\Program Files\sap\SAP Business One\AddOns\BOY\B1 Usability Package. then the Net Snippet can find the DLL file and the Exception will disappear.
Iniciar sesión para dejar un comentario.
Comentarios
1 comentario