So I’m building along in K2 Studio when I see these two warnings appear when attempting to compile and deploy…
2 Warnings(s) (Microsoft.Common) There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SourceCode.HostClientAPI, Version=184.108.40.206, Culture=neutral, PublicKeyToken=16a4d5aa6ba1b121c", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
(Workflow) Could not load types from 'C:Program Files (x86)K2 blackpearlbinSourceCode.HostClientAPI.dll'. Could not load file or assembly 'file:///C:Program Files (x86)K2 blackpearlbinSourceCode.HostClientAPI.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
A quick Google search brought me to an involved but detailed response in StackOverflow, which stepped me through making changes in the processor specification via Visual Studio’s Configuration Manager. The description seemed accurate: there’s a dependency on an X86 DLL assembly and yes, it’s running on an X64 box.
But… but… I don’t wanna be playing with stuff like this a WEEK before we go live!
The good news here is that I realized I didn’t have to mess with any of that. But I wouldn’t have realized it had I not opened the solution and started actually playing with the Configuration Manager settings.
Once nice advantage building in K2 for Visual Studio has over K2 Studio is that you can see output from the compiler. While building, I noticed a single sneaky line containing a warning:
error : The activity 'PE App Activities' does not contain any events.
Fixed that problem. And once I did, suddenly the whole processor architecture thing was no longer an issue.
Friends, if you see warnings like those at the top, look for another problem instead. If K2 Studio won’t expose the problem for you, consider switching to Visual Studio to find it.
I’m sure glad I did!