elsa-workflows / elsa-workflows/elsa-core

Elsa server crashes if an unmanaged dll is placed into the DropIns folder

Open
#4,945 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

I have a custom activity that acts as a wrapper around an unmanaged dll.
To invoke methods from the dll, I use DllImport. For simplicity reasons, I would expect to be able to place both the managed and unmanaged dll into the same directory. Doing so leads to the server crashing.

I installed the DropIns in Programm.cs with
```cs
elsa.InstallDropIns(options =>
options.DropInRootDirectory = Path.Combine(Directory.GetCurrentDirectory(), "App_Data", "Plugins"));
```

The server crashes at this line with the error `System.BadImageFormatException: 'PE image does not have metadata.'`

I would expect the server to load all DropIns that can be loaded and ignore unmanaged dlls.
I would at least expect the server to not crash on a dll that can't be loaded.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.