Error playing video using Microsoft.DirectX.AudioVideoPlayback; build version error

I am trying to embed a video in a C # windows form based application using the Microsoft.DirectX.AudioVideoPlayback build but I get the following 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.

I am using Visual Studio 2010.NET version 4.0. Microsoft DirectX SDK is also installed. Any link for an updated version of the library or any other alternative?

the code:

using Microsoft.DirectX.AudioVideoPlayback;
namespace MathBook
{
    public partial class Form1 : Form
    {
        Video vd;
        public Form1()
        { InitializeComponent(); }

        private void Form1_Load(object sender, EventArgs e)
        { }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                vd = new Video(@"absolute_file_location.wmv", true);
                vd.Owner = panel1;
                vd.Play();
            }
            catch (Exception ex) { }
        }
    }
}
+3
source share
1 answer

as the error message says you need more configuration information.

set useLegacyV2RuntimeActivationPolicyas truein the application configuration file

<startup useLegacyV2RuntimeActivationPolicy="true">
   <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
+3
source

All Articles