4
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.' 

任何想法,我是否必须包含更多的dll或任何东西

WPF

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

窗口标签故意剪断

4

1 回答 1

0

你应该安装WMP媒体播放器,如果你已经安装了,然后重新启动后卸载它安装新的。这可能是因为

  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.
于 2012-07-27T12:55:40.617 回答