[英]Could not load file or assembly 'Accord.Video.FFMPEG.dll' or one of its dependencies on Click Once Install
My application that has 'Accord.Video.FFMPEG.dll' and supporting DLL's works properly in the development environment.我的具有“Accord.Video.FFMPEG.dll”并支持 DLL 的应用程序在开发环境中正常工作。 When I publish and try to Click Once install I receive the following message: Could not load file or assembly 'Accord.Video.FFMPEG.dll' or one of its dependencies.
当我发布并尝试单击一次安装时,我收到以下消息:无法加载文件或程序集“Accord.Video.FFMPEG.dll”或其依赖项之一。 The specified module could not be found.
指定的模块无法找到。 File name: 'Accord.Video.FFMPEG.dll'
文件名:'Accord.Video.FFMPEG.dll'
As suggested in other posts, I copied the following DLL's into my Resources folder in my Visual Studio Project and specified to 'always copy to installation folder'.正如其他帖子中所建议的,我将以下 DLL 复制到我的 Visual Studio 项目中的 Resources 文件夹中,并指定为“始终复制到安装文件夹”。 I see them in the Install Folder inside the folder C:\JPGManagerPublish\Application f Files\JPGManager_3_0_0_179\Resources
我在文件夹 C:\JPGManagerPublish\Application f Files\JPGManager_3_0_0_179\Resources 内的安装文件夹中看到它们
avcodec-57.dll avdevice-57.dll avfilter-6.dll avformat-6.dll avformat-57.dll avutil-55.dll postproc-54.dll swresample-2.dll swscale-4.dll avcodec-57.dll avdevice-57.dll avfilter-6.dll avformat-6.dll avformat-57.dll avutil-55.dll postproc-54.dll swresample-2.dll swscale-4.dll
These show up in the application install folder as avcodec.57.dll.deploy, etc.这些在应用程序安装文件夹中显示为 avcodec.57.dll.deploy 等。
I install the application with Setup and I when I execute the function that utilizes Accord.Video.FFMPEG.dll I get the error message: 'Accord.Video.FFMPEG.dll' or one of its dependencies.我使用安装程序安装应用程序,当我执行使用 Accord.Video.FFMPEG.dll 的 function 时,我收到错误消息:“Accord.Video.FFMPEG.dll”或其依赖项之一。 The specified module could not be found.
指定的模块无法找到。 File name: 'Accord.Video.FFMPEG.dll'
文件名:'Accord.Video.FFMPEG.dll'
You can try to solve it with the following steps:您可以尝试通过以下步骤解决它:
Use the latest package currently available in NuGet.使用NuGet目前可用的最新package。
Make sure your application is running in 64-bit mode (check Environment.Is64BitProcess and Environment.Is64BitOperatingSystem), if so, download and install Accord.Video.FFMPEG.x64 from NuGet only (do not install Accord.Video. FFMPEG).确保您的应用程序在 64 位模式下运行(检查 Environment.Is64BitProcess 和 Environment.Is64BitOperatingSystem),如果是这样,请仅从 NuGet 下载并安装 Accord.Video.FFMPEG.x64(不要安装 Accord.Video.FFMPEG)。
If you still face the problem, please check the value of Directory.GetCurrentDirectory() and make sure the dll of FFmpeg is contained in this folder.如果您仍然遇到问题,请检查 Directory.GetCurrentDirectory() 的值并确保 FFmpeg 的 dll 包含在此文件夹中。
Try adjusting your PATH variable to include the directory where these.dlls are located (usually in the Bin folder).尝试调整您的 PATH 变量以包含这些.dll 所在的目录(通常在 Bin 文件夹中)。
string oldPath = Environment.GetEnvironmentVariable("Path"); string oldPath = Environment.GetEnvironmentVariable("路径"); Environment.SetEnvironmentVariable("Path", pathToFFmpegDlls + ";" + oldPath);
Environment.SetEnvironmentVariable("Path", pathToFFmpegDlls + ";" + oldPath);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.