2

I have recently install Visual Studio 2022, And Select Windows Form Application .NET, and select .NET6 (long term support), Now When I want to add Windows Media Player in my project from COM Components, Its shows following:

 `The following controls were added but are not enable in the active designer. Make sure the controls to add are compatible with the current designer and .NET Framework`

Now What can I use here as alternate of Windows Media Player and why this error occurs in application?

Adil Ahmed
  • 37
  • 4
  • .NET Core doesn't support ActiveX controls, which is what WMP is, so no, you can't use it. If you were using WPF you could use its `MediaPlayer`. – Etienne de Martel Apr 22 '23 at 19:15
  • @EtiennedeMartel I did not use WPF before, what developers use in .NET Core for Media Player? there should be alternative for this. – Adil Ahmed Apr 22 '23 at 19:23
  • 1
    I don't think there's a lot of people out there in 2023 making _new_ WinForms applications with media playing functionality or porting their existing Framework apps to modern .NET. All the cool kids just send YouTube links now. – Etienne de Martel Apr 22 '23 at 19:26
  • Ok. Is there is a way I can convert my project from modern .NET to .NET Framework? So I can use Windows Media Player? – Adil Ahmed Apr 22 '23 at 19:33
  • 2
    If you've just started, it'd be simpler to just create a new .NET Framework 4.8 WinForms application in Visual Studio. – Etienne de Martel Apr 22 '23 at 19:34
  • I agree more with Etienne de Martel's approach, rebuilding rather than converting. According to my test, I opened the csproj file of a .net 6.0 Winforms project with Notepad, and changed to net472. Yes, this did change the target framework of the project to .net framework 4.7.2. But errors popped up one after another. There are too many non-common modules between .net framework and .net. – wenbingeng-MSFT Apr 24 '23 at 08:02

0 Answers0