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,確定