添加mediaPlay控件時出錯 AxHost 失敗

我是在winForm窗體程序中添加media Player控件,之後一直添加不成功,添加過程如下:
在這裏插入圖片描述
遇到的錯誤是:

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)”

確定

解決方法爲:打開解決方案的屬性需改紅色地方,不能爲Any Cpu,就解決了
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章