title: Reference DLL's in C# does not work
body: <p>I have a huge problem with implementing one of my DLL's.</p>
  
  <p>This is the problem: I have a DLL, lets call it Common.dll, which is referenced in my c# project. This DLL calls another DLL called SoloistCore64.dll.</p>
  
  <p>Furthermore I have a working sample program and my own.
  In my own program the Common.dll can not find the SoloistCore64.dll for some reason. In the sample program I have, everything works fine.</p>
  
  <p>In both projects, both DLL's are in the same directory, all paths are correct in the property manager. The Reference for my Common.dll is recognized and works correctly.</p>
  
  <p>There is only one differnce in the sample program in comparison to my own and i can't find out what it means.</p>
  
  <p>This is how the reference looks in my own project. (not working)
  <a href="https://i.stack.imgur.com/53FNj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/53FNj.png" alt="My own Program"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ZPdli.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZPdli.png" alt="My own program2"></a></p>
  
  <p>And this is how it looks in the sample program. (working)<a href="https://i.stack.imgur.com/8PERT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8PERT.png" alt="Sample Program"></a></p>
  
  <p><a href="https://i.stack.imgur.com/bFnBR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bFnBR.png" alt="sample program"></a>
  I can only assume this blue icon indicates the reason why my reference is not working. Does anyone know what it means? I could not find it in the image library.</p>
  
  <p>The exception says</p>
  
  <pre><code>InnerException: 
         HResult=-2146233052
         Message=Die DLL "SoloistCore64.dll": Module not found. (Exception HRESULT: 0x8007007E) can not be load.
         Source=Aerotech.Soloist
         TypeName=""
         StackTrace:
              bei Aerotech.Soloist.Core.Wrapper.dllUtilMachineConfOpenx64(IntPtr argument1, StringBuilder argument2)
              bei Aerotech.Soloist.Core.Wrapper.dllUtilMachineConfOpen(IntPtr argument1)
              bei Aerotech.Soloist.Communication.NetworkSetup..ctor()
              bei Aerotech.Soloist.Controller..cctor()
         InnerException: 
  </code></pre>
  
  <p>I placed the .dll in every possible directory but it did not work.</p>
  
  <p>UPDATE:
  I now tried the following. I added all dll's to the system32 and syswow64 directory and now it works! I do not know why though,...my reference is in a completely different directory...</p>