开发者

Error loading Interop.WMPLib Windows MediaPlayer in WPF App

Error   1   Unknown build error, 'Cannot resolve dependency to 
assembly 'Interop.WMPLib, Version=1.0.0.0, Culture=neutral PublicKeyToken=null'        
because it has not been preloaded. When using the ReflectionOnly APIs, dependent       
assemblies must be pre-loaded or loaded on demand through the  
ReflectionOnlyAssemblyResolve event. Line 20 Position 14.' 

Any ideas , do i have to include any more dlls or anything

WPF

<Window ...  xmlns:activeXControl="clr-开发者_Go百科namespace:AxWMPLib;assembly=AxInterop.WMPLib">
<Grid>
     <WindowsFormsHost x:Name="winFormsHost" Grid.Column="1">
         <activeXControl:AxWindowsMediaPlayer x:Name="activeXMediaPlayer"/>
     </WindowsFormsHost>
</Grid>
</Window>

Window tag purposly snipped


You should install WMP Media Player ,if You have already installed ,then uninstall it after restart install new one .It may be possible because

  1.COM dll is not registered properly
  2.Because of loading different version of Interop dll(i mean DLL Hell).
  3.Dll not loaded Properly because ofplateform Compatibility 
  or Others.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜