【发布时间】:2014-10-21 06:28:36
【问题描述】:
我正在使用 Aforge.net 框架进行图像处理工作。 我添加了“AForge.Video.FFMPEG.dll”作为我项目的参考。 我正在使用 VS2012 和 32 位构建目标。 建造时我得到
System.IO.FileNotFoundException was unhandled
HResult=-2147024770
Message=Could not load file or assembly 'AForge.Video.FFMPEG.dll' or one of its dependencies. The specified module could not be found.
Source=VideoReadere
FileName=AForge.Video.FFMPEG.dll
FusionLog=""
StackTrace:
at VideoReadere.Form1..ctor()
at VideoReadere.Program.Main() in c:\Users\Prabad\Documents\Visual Studio 2012\Projects\VideoReadere\VideoReadere\Program.cs:line 19
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
我的代码是发生异常
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace VideoReadere
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//here below line give exception
Application.Run(new Form1());
}
}
}
【问题讨论】:
-
AForge.Video.FFMPEG.dll是否存在于可执行路径中? -
你看到VS中
References文件夹下AForge.Video.FFMPEG.dll旁边有一个黄色三角形吗? -
如果您正确添加了引用,那么我会注意这部分错误消息“或其依赖项之一”。您是否还引用了 AForge.Video.FFMPEG.dll 所依赖的所有 DLL。
-
我如何找到 AForge.Video.FFMPEG.dll 的依赖关系
-
使用 Dependancy Walker from 查找您的依赖项。你可以从dependencywalker.com下载
标签: c# ffmpeg filenotfoundexception aforge