I have a huge problem with implementing one of my DLL's.
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.
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.
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.
There is only one differnce in the sample program in comparison to my own and i can't find out what it means.
This is how the reference looks in my own project. (not working)
And this is how it looks in the sample program. (working)
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.
The exception says
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:
I placed the .dll in every possible directory but it did not work.
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...