In my PowerShell 7 script I can access classes and methods for a .dll I’ve added using
Add-Type, but when I compile an .exe using Merge-Script I receive an error. A sample of the error is:
This works when run in the terminal:
But when compiled I receive this error:
Exception calling “showError” with “2” argument(s): “Object reference not set to an instance of an object.”
It appears to me like Merge-Script is including my dll, although I can’t be sure, but I am not sure how to refer to it once it is bundled into my exe.