Skip to main content

 

Hello

I use these DLLs in a Rest WebAPI Core application 

SourceCode.Workflow.Client

SourceCode.HostClientAPI

SourceCode.Security.UserRoleManager.Management

SourceCode.Workflow.Management

when i build it builds successfully in my VS2022
but when i run i go the exception


ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'SourceCode.Workflow.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d'. An attempt was made to load a program with an incorrect format.

 

this code is saved in a Git repo and it's working for all my colleges but only on my machine i get this error i tried remove and add the same DLLs with my colleges
I check the option Use the 64 bit version from VS

but i still get the error

Can you help me I've been struggling with this for a long time now

Thanks

It sounds like there is some difference on your machine vs your colleagues.  Here are some things you can check:



1. Did you install the DLLs using the Five installer?  Some DLLs have dependencies on other DLLS and the installer will put down all the DLLS.  There should be an install option for developer files.



2. Do you have the version of the .NET Framework required by the K2 documentation?



3. The runtime config for a web app can specify a different .NET framework than was used to build.  Is it the correct one?



5. You would only need the 64-bit DLLs if you chose that option in the installer.



6. Try working one of the API tutorial examples in the help site.  Maybe some step in there will trigger an idea.


What I have seen in the past is that there are two versions of this DLL, one of which is the 32 bit version and the other is the 64 bit.



 



One is in the K2 Blackpearl Install FolderBin and one is in the K2 Blackpearl Install FolderHost ServerBin folder.



 



I can't remember which way round it is but try both of them and one of them should work as expected.



 



Cheers


Reply