小编Dar*_*Lee的帖子

C# Windows Media Player AxHost 错误:无法创建组件“AxHost”

我正在尝试将 Windows Media Player 对象添加到我的 Windows 窗体中,但它弹出一个错误:

Failed to create compopnent 'AxHost'. The error message follows:
'System.Reflection.ReflectionTypeLoadException: Unable to load
one or more of the requested types. Retrieve the LoaderExceptions
property for more information.
  at
System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.
CreateComponentsCore(IDesignerHost host)
  at
System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost 
host, IDictionary defaultValues)
  at
System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost
host, IDictionary defaultValues)
  at
System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem
tool, Control parent, int32 x, int32 width, int32
height, Boolean hasLocation, Boolean hasSize,
ToolboxSnapDragDropEventArgs e)'
Run Code Online (Sandbox Code Playgroud)

但是,如果我要创建一个新项目并添加 Windows Media Player,它就可以正常工作。

我在网上尝试了一些解决方案,例如在新项目(使用 Windows Media Player)打开时添加 Windows Media Player,将现有表单添加到项目等,但无济于事。

有什么我做错了吗?

c# windows media axhost media-player

3
推荐指数
1
解决办法
2158
查看次数

标签 统计

axhost ×1

c# ×1

media ×1

media-player ×1

windows ×1