我正在尝试将 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)'
但是,如果我要创建一个新项目并添加 Windows Media Player,它就可以正常工作。
我已经尝试了一些在线解决方案,例如在新项目(使用 Windows Media Player)打开时添加 Windows Media Player,将现有表单添加到项目等,但无济于事。
有什么我做错了吗?