3
votes

I work in visual studio 2008, when run the program this error is shown:

$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();
        }
    }
}

What is wrong with my program?

1

1 Answers

2
votes

Frequently this is a consequence of trying to load an x86 binary on a x64 system (or vice versa). Check that your program is compiling to the same target as the binary you're using (in this case AForge.Video.FFMPEG).