aelassas / wexflow

.NET Workflow Engine and Automation Platform

Home Page:https://wexflow.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding dependencies to custom tasks

Gunob17 opened this issue · comments

Hello, first of all love the project.
I'm trying to make a custom task and are running into an issue. I want my task to use a NuGet dependency but can't seem to get Wexflow to see the library dll I get the following error when trying to run my flow

2023-03-24 10:01:40,396 ERROR [17] - An error occured while running the workflow. Error: {id: 34, name: test, enabled: True, launchType: Periodic}
System.IO.FileNotFoundException: Could not load file or assembly 'NModbus, Version=3.0.78.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'NModbus, Version=3.0.78.0, Culture=neutral, PublicKeyToken=null'
   at Wexflow.Tasks.FirstTestTask.ModbusHandler..ctor(String ip, Int32 port, Byte modbusAddress)
   at Wexflow.Tasks.FirstTestTask.FirstTestTask.Run()
   at Wexflow.Core.Workflow.RunSequentialTasks(IEnumerable`1 tasks, Boolean& success, Boolean& warning, Boolean& error)
   at Wexflow.Core.Workflow.StartSync(String startedBy, Guid instanceId, Boolean& resultWarning)

I have tried placing the nmodbus dll in the same folder as my custom task dll and in the wexflow.server folder as i can other dependencies are located here.

Do I really need to download the project ad add it before publishing it or is there another way to use NuGet packages in custom workflows?