1

I'm trying to make a simple video player so i wont to use

Microsoft.DirectX.AudioVideoPlayback.dll

but when i'm using this dll file programe raise this error

Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

before the open file dialog appear in this code

private void button1_Click(object sender, EventArgs e)
{
    int width = this.panel1.Width,
        height= this.panel1.Height;

    OpenFileDialog open = new OpenFileDialog();
    open.ShowDialog();

    ss = new Video(open.FileName, false);

    ss.Owner = panel1;
    ss.Size = new Size(width, height);

    ss.Play();
    ss.Stop();
}

I'm searching about this and I found some solutions on StackOverflow:

  1. Mixed Mode Error when building in Release Mode
  2. Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot
  3. Mixed mode assembly is built against version 'v1.1.4322'

But I don't know how to fix this error so any one have another solution or can explain any one of these. If it required editing a file, please let me know where this file is located.

Thank's a lot

Community
  • 1
  • 1
BlackRoot
  • 504
  • 1
  • 9
  • 29

1 Answers1

5


What you are looking for is the App.config of your application. It should contain the following xml:

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
  <startup useLegacyV2RuntimeActivationPolicy="true"> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> 
  </startup> 
</configuration> 

This information appears in the links you provided.

Jony Adamit
  • 3,178
  • 35
  • 44
  • Where i can find App.config file. can you give me the path – BlackRoot Aug 06 '12 at 23:17
  • It should be in your Windows Application Project.. if it somehow doesn't exist there you can always add it yourself. Just create a file by that name, place it in your project's root folder and paste the XML above. – Jony Adamit Aug 07 '12 at 11:33