我正在尝试使用程序集Microsoft.DirectX.AudioVideoPlayback在基于 c# windows 窗体的应用程序上嵌入视频,但出现以下错误
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.
我正在使用 Visual Studio 2010 .NET 4.0 版 Microsoft DirectX SDK 也安装了库更新版本的链接或任何替代方案?
代码:
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) { }
}
}
}