I am referencing the OpenXml SDK DLL in one of my projects for use in a script. It compiles fine, however when running I get a File Not Found exception saying it "Could not load file or assembly" referring to the DLL. However, if I take this DLL and move it to the OpenSpan installation directory and then reference it there, it works just fine. Why is this a thing, and how can I use the DLL without having to reference it specifically in the OpenSpan installation directory? I am on version 8.0.1103 for reference.
When using 3rd-party DLLs, there are some reserved locations that you can put the DLL. One location is the installation folder like the comment above says. There are also other locations. The below post explains the PublicAssemblies folder in the %appdata%\OpenSpan directory. Additionally, you can add a Public Assemblies folder in the installation directory for the same effect.