Je suis en train d'ajouter un objet Windows Media Player à ma forme de fenêtres, mais il éjecte une erreur:C# Windows Media Player AxHost Erreur
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)'
Cependant, si je devais créer un nouveau projet et ajouter la Windows Media Player, ça marche parfaitement bien.
J'ai essayé quelques solutions en ligne telles que l'ajout de Windows Media Player pendant que le nouveau projet (avec Windows Media Player) est ouvert, en ajoutant le formulaire existant au projet etc mais en vain.
Y a-t-il quelque chose que j'ai mal fait?
Merci. Cela m'a amené dans la bonne direction, mais j'ai aussi dû cocher la case "Autoriser le code dangereux". – mohrtan