I am trying to add a Windows Media Player object to my Windows form but it pops out an error:
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)'
However, if I were to create a new project and add the Windows Media Player, it works perfectly fine.
I have tried some solutions online such as adding the Windows Media Player while the new project (With Windows Media Player) is open, adding the existing form to the project etc. but to no avail.
Is there anything that I have done wrongly?