Microsoft Visual Studio
---------------------------
创建组件“AxHost”失败。错误消息为:

“System.Reflection.ReflectionTypeLoadException: 无法加载一个或多个请求的类型。有关更多信息,请检索 LoaderExceptions 属性。

在 System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)

在 System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)

在 System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)

在 System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs e)”

 

1 我打开了一个其他的解决方案的没有添加过mediaplayer的项目,拖入mediaplayer控件,正常

或者删除项目里对mediaplayer的引用-两个地方

不关闭vs ,然后再打开这个项目,就ok了!

 2 直接找到项目的 obj\x64\Debug 目录 删除再编译就ok了

3 打开同一解决方案中的其他项目,拖入控件。这个项目就好了,

如果vs的工具箱没有mediaplayer控件,右击 常用下方-选择项-com-选择windowsmediaplayer,确定

相关文章:

  • 2021-12-26
  • 2022-01-19
  • 2021-08-02
  • 2021-05-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2022-01-02
  • 2021-08-19
  • 2021-07-05
  • 2021-12-07
  • 2021-05-16
  • 2022-12-23
相关资源
相似解决方案