Skip to main content

hi all,

I am trying to consume K2 client Dlls in one of my asp.net core template web api project.

 

We created ASP.NET core template web api project.( using framework 4.6.2) and we are using sourcecode.hostclient dll to start a workflow instance.

 

How ever when we run the web api project at the below code line we are getting error.

 

""

Additional information: Could not load file or assembly 'SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' or one of its dependencies. An attempt was made to load a program with an incorrect format.

""

 

we referred the K2 Workflow client nuget paockage for referring K2 client dlls in the above project.

 

In some articles they told that if the dlls are of 32 bit then we will see this issue. How ever I created a new Nuget package with 64 bit dlls of k2 client and referred this nuget package but still seeing the same above error, Can you please let us know the resolution for this.

 

 

 

Hi,

 

To keep the answer short, I ran into the same issue with asp.net application. I used one of the dll below which resolved the issue.

I have no idea about NuGet package but you can try copying below dll in your project one by one. You can find these dlls on k2 server or may be on your machine if you have client components installed.

 

C:WindowsassemblyGAC_32SourceCode.HostClientAPI

C:WindowsassemblyGAC_64SourceCode.HostClientAPI


Hi,


 


You can also try changing the framework version. I once encountered the same error, and I solved it by changing the .NET Framework version to 4 or 4.5. Can't remember which one, but I will recommend you try playing around with the .NET Framework version in your project properties.


how can i chenge the .net framwork version to 4 or 4.5 however the issue is with .net core

Reply