Dynamically Loaded Libraries in Server

Dynamically loaded libraries have to be placed in the root folder of the application. If the dynamically loaded library has its own dependencies, that are not included in the Server, they have to be added to configuration file Origam.Server.deps.json. On the other hand the loaded library doesn’t have to be included there.

For example let’s have a project that contains a custom library CustomServiceLibrary.dll, that is used as a workflow service and serves as a wrapper for WrappedLibrary.dll. As described before to be able to use CustomServiceLibrary.dll we need to add WrappedLibrary.dll to configuration file Origam.ServerCore.deps.json.

First we need to add WrappedLibrary.dll to libraries section:

"WrappedLibrary/1.0.0.0": {
    "type": "reference",
    "serviceable": false,
    "sha512": ""
}

And then we need to add an entry to targets -> .NETCoreApp,Version=v8.0:

"WrappedLibrary/1.0.0.0": {
    "runtime": {
        "WrappedLibrary.dll": {
            "assemblyVersion": "1.0.0.0",
            "fileVersion": "1.0.0.0"
        }
    }
}