title: How do I compile a WCF Service Library in 32-bit mode?
body: <p>I can reference Matlab code from a x86 based project, but not from an x64 project.</p>
  
  <p>I can build the WCF Service as "Any CPU", but not x86. When I attempt to build as x86 only, it gives the following error:</p>
  
  <pre><code>---start error---
  System.BadImageFormatException: Could not load file or assembly 'file:///D:\backtest\WcfServiceLibrary.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
  ---end error---
  </code></pre>
  
  <p>Thus, I'm stuck: how on earth do I provide Matlab calls via WCF? Its like some weird form of developers XOR.</p>
  
  <p>Any ideas on how to either (a) compile the WCF Service Library in 32-bit mode, or (b) work around the issue?</p>
  
  <p>I have Win7 x64, MSVS 2010.</p>