简体   繁体   中英

How to connect wrapper DLL to the API DLL for use in the C# project?

I use Dynamic Audio Normalizer for my WF solution to normalize audio file volume. It has two .dll libraries that must be connected to the project for usage. One of them - .NET library is connected well, the other one - API cannot be to the project at all. Whilst runtime I get a FileNotFound exception that's deatiled descrition

Could not load file or assembly "DynamicAudioNormalizerNET.dll" or one of its dependencies .

Also it is written in the documentation that

Microsoft.NET-based Application → Use the DynamicAudioNormalizerNET C++/CLI wrapper class, provided by the DynamicAudioNormalizerNET.dll assembly, requires DynamicAudioNormalizerAPI.dll at runtime.

It's dependency is of course "DynamicAudioNormalizerAPI.dll", but it is in the solution's folder as well as the NET.dll. Also both libraries are added to the solution as files and their "Copy to output" feature is set to "Copy always". How can I link this two DLL or just make it run properly?

There are two probable reasons.

  1. The first reason could be that DynamicAudioNormalizerAPI.dll is not placed together with DynamicAudioNormalizerNET.dll . Check Copy local refference property (in Solution Explorer) and Make sure that these two dlls comes together.

  2. DynamicAudioNormalizerAPI.dll could have its own unresolved dependencies. You can easily check this by opening .dll with special tool Dependency Walker . It will show you if you also need some runtime or something.

It's dependency is of course "DynamicAudioNormalizerAPI.dll", but it is in the solution's folder as well

It needs to be in your projekt output directory (eg bin\\debug or bin\\release , where your .exe is), not the solution folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM