I'have the following situation:
I have a delphi dll (unmanaged) that works. I have a win forms application (a proof of concept application) that works. The dll (and all its dependencies) are copied in the Bin/Debug directory of the application.
I've createad a .NET managed library which has a class that is a wrapper around the dll. all the dependencies of the dll and the dll are copied in the /Bin/Debug folder.
In my unit test project for the managed library I've created a unit test for the wrapper class. When I run the unit test the following error is shown:
DAEcommerce.Logic.Tests.Infrastructure.L3.L3DatabaseConnectionTest.OpenClose_ProperParameters_ActiveSetToTrueAndFalse: System.DllNotFoundException : Unable to load DLL 'AttrbInterface.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
The dll in question is copied in the Bin/Debug folder of the unit test project. I've tried also copying it to Windows/system32, adding it to the windows path and copying it in the folder where the NUnit exe is located. It just doesn't work.
I have the following questions:
- What is the problem?
- How can I found what is the problem?
- How can I fix it.