简体   繁体   中英

Could not load file or assembly 'accord.video.ffmpeg.x64.dll' or one of its dependencies

I'm using Accord.video.ffmpeg.x64. My project is built in x64 as well. It is a click once windows forms application. I installed accord through nuget. C++ redistributor is installed.

Everything works fine when I run the program from debug. But when I publish it and try to run it (on the same machine or any other machine) I get the error "could not load file or assembly 'accord.video.ffmpeg.x64.dll' or one of its dependencies."

Thank you for any help you can provide.

Install on the machine both

  • vc_redist-2015.x64.exe
  • vc_redist-2015.x86.exe

and copy all files from your Nuget packages folders

  • packages\Accord.Video.FFMPEG.x64.3.8.0\lib.net(Version)
  • packages\Accord.Video.FFMPEG.x64.3.8.0\build

to the installation folder of your application.

I had the same issue this week, but I found the solution, When I compared the files in the bin folder vs the application directory under programs files: the bin folder had 8 additional files that weren't in the application installed folder:

avcodec-57.dll, avdevice-57.dll, avfilter-6.dll, avformat-57.dll, avutil-55.dll, postproc-54.dll, swresample-2.dll, swscale-4.dll,

These files need to be copied into the application install folder. They can't be referenced since they aren't .net they are c++ dll. So what I did was added the dll files directly to my project, then right click each file properties and for build action I selected "content", then for copy to output directory, I put "copy if newer." This fixed the issue for me, so I hope it works for you too!

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