views:

18

answers:

1

I'have the following situation:

  1. 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.

  2. 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.

  3. 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:

  1. What is the problem?
  2. How can I found what is the problem?
  3. How can I fix it.
A: 

Try using the Fusion Log Viewer utility to from the Windows SDK to obtain more information about what's actually happening when your .NET assembly is loaded.

Alex Dresko