我在 visual studio 2008 中工作,运行程序时显示此错误:
$exception {"Could not load file or assembly 'AForge.Video.FFMPEG, Version=2.2.5.0, Culture=neutral, PublicKeyToken=03563089b1be05dd' or one of its dependencies. An attempt was made to load a program with an incorrect format."}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AForge.Video.FFMPEG;
namespace WindowsFormsApplication9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
VideoFileReader video = new VideoFileReader();
}
}
}
我的程序有什么问题?
最佳答案
这通常是尝试在 x64 系统上加载 x86 二进制文件(反之亦然)的结果。检查您的程序是否编译为与您正在使用的二进制文件相同的目标(在本例中为 AForge.Video.FFMPEG
)。
关于c# - "An attempt was made to load a program with an incorrect format",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20739849/