malcoauri
malcoauri

Reputation: 12189

How to add reference to Windows Media Player to my Visual Studio project?

There is the following trouble: I made some C# application with Windows Media Player component (I added it to my toolbox). Then I created an installer for my project, and there were the following dependencies:

Microsoft .NET Framework; AxInterop.WMPLib.dll; Interop.WMPLib.dll; wmp.dll;

Now when user tries to install my app he takes error about impossible loading "AxInterop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null". How can I fix it? .NET framework is installed successfully.

Upvotes: 3

Views: 16125

Answers (1)

Russel
Russel

Reputation: 31

Go to solution explorer, right click references, add reference, COM elements, browse, look for windows media player in your programs, you may add both the exe and dll files, and then add the using in your name spaces (using WMPLib;)

Upvotes: 3

Related Questions