Could not load file or assembly 'SourceCode.HostClientAPI'

  • 16 July 2013
  • 3 replies
  • 29 views

Badge +1

Hi


i got this error


Could not load file or assembly 'SourceCode.HostClientAPI' or one of its dependencies. An attempt was made to load a program with an incorrect format



I created separate projects for smartobjet , workflow process, asp.netforms and k2 Class library



I added reference to 3 dlls in my asp.net forms project but I got this error when I browse employee form


1)SourceCode.HostClinetApi


2)SourceCode.WorkFlow.Client


3)SourceCode.SmartObjects.Client



Also I did the settings to debug anycpu in all projects.


3 replies

Badge +5

Where did you get the assemblies to reference? K2 ships with 32 bit and 64 bit dlls, and if you use the wrong one you'll get an error.

Badge +1

C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.HostClientAPI.dll


i used this path


in visual studio add reference

Badge +5

Is the server you're publishing to a 64 bit machine?


Try going to the bin folder of the application you've published and deleting the offending SourceCode dlls from it. The application should be able to pick up the GAC'd dlls.


Also, I assume it runs fine on your local machine?


If not, please provide a bit more info on what you're doing and when you see the error popping up.

Reply