【问题标题】:Windows Media Player not working on Windows XP using visual studio applicationWindows Media Player 无法在使用 Visual Studio 应用程序的 Windows XP 上运行
【发布时间】:2011-08-08 13:20:56
【问题描述】:

我已在我的 Visual Studio 2010 应用程序中嵌入了 WMP 控件,该应用程序可在 Windows 7(框架 4.0)上运行,但在 winXP 上安装该应用程序时,我收到以下错误:

System.IO.FileNotFoundException: Could not load file or assembly 'Interop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'Interop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Aquila_Media_Manager.modMediaPlayer.Play_File()
   at Aquila_Media_Manager.MainForm.tsbPlay_Click(Object sender, EventArgs e) in C:\Users\Micba\Documents\Visual Studio 2010\Projects\Aquila MedMan\MainForm.vb:line 2718
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

我猜这是一个参考问题,但我添加了对 WMP 库(axinterop.wmplib.dll 和 interop.wmplib.dll)的引用。 WMP 在 XP 机器上工作,但从我的应用程序调用时却不行。

我现在已经在网上搜索了 5 天并更改了引用,并在 XP 机器上重新安装了媒体播放器,但没有任何效果。

感谢您的帮助。

【问题讨论】:

    标签: vb.net winforms visual-studio-2010 entity-framework-4 wmp


    【解决方案1】:

    将您的构建配置更改为 x86 而不是 AnyCPU。这会将其构建为 32 位应用程序,并且 Interop.WMPLib 可以正常工作。问题是,至少据我所知,没有 64 位的 Interop WMPLib 版本。

    【讨论】:

      猜你喜欢
      • 2014-01-04
      • 2014-10-08
      • 1970-01-01
      • 1970-01-01
      • 2012-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-09
      相关资源
      最近更新 更多