title: an attempt was made to load a program with an incorrect format exception going away with VS installation
body: <p>I've designed a C# Windows appln which also calls internally some functions [imported from C++ DLL through DllImport()]</p>
  
  <p>My C++ code is built as .DLL in Win32 platform whereas my C# is built as "Any CPU" platform.</p>
  
  <p>When I run the .EXE (C#) in my test machine, I face an error as </p>
  
  <blockquote>
    <p>an attempt was made to load a program with an incorrect format
    exception from hresult 0x8007000B</p>
  </blockquote>
  
  <p>However, this error is not faced if I install VSS 2010 in my machine and then run the EXE. </p>
  
  <p><strong>1) Reason for this error?
  2) why is the error not observed when VSS is installed?</strong> </p>
  
  <p>I've used Win7 OS(64bit) to build the .EXE (C#) in <strong>AnyCPU</strong> platform which in turn depends on a DLL (C++ Dll imported in C# using DllImport) built in <strong>Win32</strong></p>