Using K2 DLL (SourceCode.Workflow.Client) with .net core?

  • 13 November 2020
  • 4 replies
  • 285 views

Hello all,

i’m trying to acces out of office (worklistshare) info via the SourceCode.Workflow.Client dll (K2 Five v5.3) from a .net core project (ASP.NET core web application), but that doesn’t seem to work. 

I’ve surfed around but I can’t seem to find whether it is possible to call the K2 dlls from a .net core project (and if so, what version do you use). 

The error I’m getting, is not very helpful either: 

“An unhandled exception was thrown by the application.
System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> System.DllNotFoundException: Unable to load DLL '' or one of its dependencies: unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))”. 

For completeness sake: I’ve added the 64bit DLL in references and I’ve changed the project to platform target x64. (after building for Any CPU, with the same error).

Any help or insights would be greatly appreciated. 

With kind regards,

Michael


4 replies

Userlevel 5
Badge +13

Hello - I believe that in order to reference this DLL, you must also reference the HostClientAPI.dll. Please include that one in your references and see if it helps

Hello tbyrne777,

thank you very much for the suggestion. I have referenced the HostClientAPI dll, but that does not change anything. 

I’ve also tried referencing the DLLs from GAC instead from a local folder (I’m debugging the project on my own machine) and I’ve even played around with all the platform target options, but that does not change anything either. 

with kind regards,

Michael

Badge +13

https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support

.NET 2.0 is way too old.

If SourceCode recompiles as 4.6.1 you can use it with .NET Core 2.0.

Badge +5

Good day Maajkol, can you upload the sample project here and I can take a look.

Reply