Windows phone 7 Windows Phone 8 System.Reflection.TargetInvocationException

Windows phone 7 Windows Phone 8 System.Reflection.TargetInvocationException,windows-phone-7,windows-phone-8,video-streaming,smooth-streaming-player,Windows Phone 7,Windows Phone 8,Video Streaming,Smooth Streaming Player,问题出在这里- 我正在创建一个具有视频流功能的windows phone 8应用程序。 我使用的是来自- 按照他们的步骤,我得到了这个例外 $exception {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Windows.Media.DrmException: 1001 at MS.Intern

问题出在这里-

我正在创建一个具有视频流功能的windows phone 8应用程序。 我使用的是来自-

按照他们的步骤,我得到了这个例外

$exception  {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Windows.Media.DrmException: 1001
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.MediaElement_SetMediaStreamSource(MediaElement mediaElement, Int32 mediaStreamerId)
   at System.Windows.Controls.MediaElement.SetSource(MediaStreamSource mediaStreamSource)
   at Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.au(Uri A_0)
   at Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.a3(Uri A_0, Uri A_1)
   at Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.a7(DependencyObject A_0, DependencyPropertyChangedEventArgs A_1)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.set_SmoothStreamingSource(Uri value)
   at Microsoft.PlayerFramework.Adaptive.SmoothStreamingMediaElementWrapper.Microsoft.PlayerFramework.IMediaElement.set_Source(Uri value)
   at Microsoft.PlayerFramework.MediaPlayer.<>c__DisplayClass93.<set__Source>b__92()
   at Microsoft.PlayerFramework.MediaPlayer.RegisterApplyTemplateAction(Action action)
   at Microsoft.PlayerFramework.MediaPlayer.set__Source(Uri value)
   at Microsoft.PlayerFramework.MediaPlayer.LoadSource(MediaLoadingInstruction loadingInstruction)
   at Microsoft.PlayerFramework.MediaPlayer.<>c__DisplayClass2e.<<SetSource>b__2c>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.DispatcherOperation.Invoke()}    System.Exception {System.Reflection.TargetInvocationException}
$exception{System.Reflection.TargetInvocationException:调用的目标已引发异常。-->System.Windows.Media.DRMEException:1001
在MS.Internal.XcpImports.CheckHResult(UInt32小时)
在MS.Internal.XcpImports.MediaElement_SetMediaStreamSource处(MediaElement MediaElement,Int32 MediaStreamRid)
位于System.Windows.Controls.MediaElement.SetSource(MediaStreamSource MediaStreamSource)
在Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.au(Uri A_0)上
在Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.a3(Uri A_0,Uri A_1)
位于Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.a7(DependencyObject A_0,DependencyPropertyChangedEventArgs A_1)
位于System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp、Object oldValue、Object newValue)
在System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty属性、EffectiveValueEntry oldEntry、EffectiveValueEntry&newEntry、ValueOperation操作)
位于System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp,对象值,布尔AlloreAndonlySet)
位于System.Windows.DependencyObject.SetValue(DependencyProperty dp,对象值)
位于Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.set_SmoothStreamingSource(Uri值)
在Microsoft.PlayerFramework.Adaptive.SmoothStreamingMediaElementWrapper.Microsoft.PlayerFramework.IMediaElement.set_源中(Uri值)
在Microsoft.PlayerFramework.MediaPlayer.c__显示类93.b__92()
在Microsoft.PlayerFramework.MediaPlayer.RegisterApplyTemplateAction(操作操作)上
在Microsoft.PlayerFramework.MediaPlayer.set\u源(Uri值)
在Microsoft.PlayerFramework.MediaPlayer.LoadSource(MediaLoadingInstruction loadingInstruction)上
在Microsoft.PlayerFramework.MediaPlayer.c__DisplayClass2e.d__31.MoveNext()上
---来自引发异常的上一个位置的堆栈结束跟踪---
在System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__0(对象状态)中
---内部异常堆栈跟踪的结束---
位于System.RuntimeMethodHandle.InvokeMethod(对象目标、对象[]参数、签名符号、布尔构造函数)
位于System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(对象obj,对象[]参数,对象[]参数)
在System.Reflection.RuntimeMethodInfo.UnsafeInvoke(对象对象obj、BindingFlags invokeAttr、绑定器Binder、对象[]参数、CultureInfo区域性)
位于System.Delegate.DynamicInvokeImpl(对象[]args)
在System.Windows.Threading.DispatcherOperation.Invoke()}System.Exception{System.Reflection.TargetInvocationException}
如果在从头开始创建新应用程序时遵循相同的步骤,则不会出现上述异常。 我以前也用过,效果很好

如果删除对Microsoft.Web.Media.SmoothStreaming.dll的引用, 然后我得到了这个例外

An exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module. and wasn't handled before a managed/native boundary
An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
Unhandled Exception: System.Windows.ApplicationUnhandledExceptionEventArgsCould not load file or assembly 'Microsoft.Web.Media.SmoothStreaming, Version=1.1.837.146, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.   at Microsoft.PlayerFramework.Adaptive.AdaptivePlugin.get_MediaElement()
   at Microsoft.PlayerFramework.MediaPlayer.GetTemplateChildren()
   at Microsoft.PlayerFramework.MediaPlayer.<OnApplyTemplate>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)
The program '[3720] TaskHost.exe' has exited with code -1 (0xffffffff).
未知模块中发生“System.IO.FileNotFoundException”类型的异常。在托管/本机边界之前未处理
mscorlib.ni.dll中发生“System.IO.FileNotFoundException”类型的异常,在托管/本机边界之前未处理该异常
'TaskHost.exe'(CLR C:\windows\system32\coreclr.dll:Silverlight AppDomain):已加载'C:\windows\system32\en US\mscorlib.debug.resources.dll'。模块是在没有符号的情况下构建的。
未处理的异常:System.Windows.ApplicationUnhandledExceptionEventTargets无法加载文件或程序集“Microsoft.Web.Media.SmoothStreaming,Version=1.1.837.146,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。系统找不到指定的文件。在Microsoft.PlayerFramework.Adaptive.AdaptivePlugin.get_MediaElement()上
在Microsoft.PlayerFramework.MediaPlayer.GetTemplateChildren()上
在Microsoft.PlayerFramework.MediaPlayer.d_u1.MoveNext()上
---来自引发异常的上一个位置的堆栈结束跟踪---
在System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__0(对象状态)中
程序“[3720]TaskHost.exe”已退出,代码为-1(0xFFFFFF)。
所以我似乎有一些相互矛盾的参考资料(我就是这么想的)

我如何解决这个问题

感谢所有帮助,谢谢你

对不起

糟糕的问题

应用程序的清单文件中缺少功能