title: C# Project, GAC, DLL
body: <p>i'm having a problem with my built Application.</p>
  
  <p>I have a project taken from <a href="http://www.codeproject.com/Articles/21475/TblProc-OpenOffice-Calc-and-Excel" rel="nofollow noreferrer">here</a> modified it and implemented in my program.<br>
  Shortly, this TableProc project generates a report to OpenOffice Calc and uses some libraries from OpenOffice - cli_basetypes (GAC/MSIL), cli_oootypes (GAC/MSIL), cli_uno (GAC/MSIL), cli_ure (GAC/MSIL), cli_uretypes (GAC/MSIL) <strong>AND</strong> cli_cppuhelper (GAC32).</p>
  
  <p>Looks like:<br>
  Solution<br>
  .....Project1 (references TableProc)<br>
  .....Project2 (references TableProc)<br>
  .....TableProc (implemented) (references on libraries in bin directory   cli_basetypes.dll and others)  </p>
  
  <p>So, when i'm in debugging mode VS 2010, those DLL are in directory <strong>*/bin/</strong> - Everything works fine - reports are done.</p>
  
  <p>But when i build up my application:<br>
  1. There are no DLL's for cli_basetypes, cli_oootypes and others<br>
  2. There are project1.dll, project2.dll and TableProc.dll and
      Program.exe</p>
  
  <p><strong>PROBLEM:</strong></p>
  
  <p>In a built up application, it tells that:  </p>
  
  <p>Error 1: </p>
  
  <blockquote>
    <p>Could not load file or assembly 'cli_cppuhelper, Version=1.0.14.0,
    Culture=neutral, PublicKeyToken=ce2cb7e279207b9e' or one of its
    dependencies. Ann attempt was made to load a programm with an
    incorrect format.)</p>
  </blockquote>
  
  <p>Ok, I tried to manually put those DLL's next to my Program.exe - same error.</p>
  
  <p>Then I found out, that those libraries are installed in GAC when you install Open Office. I looked at them, and noticed that all of them are installed in GAC/MSIL but cli_cppuhelper is installed in GAC/32.</p>
  
  <p>I tried to manually copy cli_cppuhelper assembly from GAC/32 to GAC/MSIL, and got this error:</p>
  
  <p>Error 2:</p>
  
  <blockquote>
    <p>Is not a valid Win32 application. (Exception from HRESULT:
    0x800700C1))</p>
  </blockquote>
  
  <p>From this i understood, that my apllication, when looks for DLL's it looks only in GAC/MSIL</p>
  
  <p>Please help, i don't know what to do...</p>