HOME DOCUMENTATION DOWNLOADS BLOG

Dynamically Loaded Libraries in ServerCore

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

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

First we need to add Taldis.PdfAnalyzer.dll to libraries section:

"Taldis.PdfAnalyzer/1.4.0.0": {
    "type": "reference",
    "serviceable": false,
    "sha512": ""
}

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

"Taldis.PdfAnalyzer/1.4.0.0": {
    "runtime": {
        "Taldis.PdfAnalyzer.dll": {
            "assemblyVersion": "1.4.0.0",
            "fileVersion": "1.4.0.0"
        }
    }
}