User control has additional libraries not being found when executing

0

I am working on a WPF solution, I have a user control in a separate (included) project, this user control references c++ dlls, included by a post script:

xcopy "$(ProjectDir)x64\*.dll"  "$(TargetDir)"  /Y /E /C /F

The issue is that the main project is not finding these dlls when executing.

Message "Unable to load DLL 'libhelper.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

I think I need to distribute the whole content of my Bin folder.

How can I include these additional dlls in the main project?

c#
wpf
libraries
dllnotfoundexception
asked on Stack Overflow Sep 18, 2019 by DanielV • edited Sep 18, 2019 by DanielV

1 Answer

1

You can set the output of your main project and the user control to the same folder. Right click on each of them, then select Build, Output, Output path, set the same directory and save. All the output will go to the same directory therefore you will access all resources.

enter image description here

answered on Stack Overflow Sep 18, 2019 by Juanito

User contributions licensed under CC BY-SA 3.0