使用 SL Media Framework 和 MVVM-Lite 的应用程序从 WP7 升级到 WP7.1

发布于 2024-12-02 12:18:25 字数 599 浏览 1 评论 0原文

我有一个 WP7 应用程序,最近升级到 WP7.1(包括 MVVM-Lite 程序集),并且 SL 媒体框架播放器 (SMF) 停止工作。我打开播放器登录,发现它正在寻找的解码器插件没有找到。 SMF 使用 MEF 查找插件,但无法找到适合我的媒体的插件。

我创建了一个仅使用 SMF 播放器的测试项目,并且能够毫无问题地播放 SmoothStreaming 和 Progressive 视频。因此,我将真实应用程序中引用的 dll 逐一添加到测试应用程序中 - 当我添加 MVVM-Lite 7.1 和 Blend 7.1 程序集(System.Windows.Interactivity 和 Microsoft.Expression.Interactions)时 - MEF 发现的插件停止工作。

然后,我将 MVVM-Lite 和 Blend SDK 程序集恢复到 v7,现在发现插件没有任何问题。

我不知道在 Blend SDK 或 MVVM-Lite 中使用了 MEF,但与 Blend SDK 7.1 和 MVVM-Lite 7.1 程序集一起使用时,SMF 的 MEF 发现之间似乎存在问题。

对此有什么想法或见解吗?顺便说一句 - SMF 没有适用于 WP7.1 的新版本,

谢谢 迈克尔

I have a WP7 app that I recently upgraded to WP7.1 (including the MVVM-Lite assemblies) and the SL Media Framework player (SMF) stopped working. I turned on logging in the player and noticed that the decoder plugin it was looking for was not found. The SMF uses MEF to find the plugins and it was not able to find the plugin for my media.

I created a test project with just the SMF player and I was able to play SmoothStreaming and Progressive videos no problem. So one by one I added the referenced dlls that were in my real app into the test app - and when I added the MVVM-Lite 7.1 and Blend 7.1 assemblies (System.Windows.Interactivity and Microsoft.Expression.Interactions) - the MEF discovery of the plugins stopped working.

I then reverted the MVVM-Lite and Blend SDK assemblies back to v7 and the plugins were now discovered with no issues.

I am unaware of any use of MEF in the Blend SDK or MVVM-Lite but it appears there is an issue between SMF's MEF discovery when used with the Blend SDK 7.1 and MVVM-Lite 7.1 assemblies.

Any thoughts or insight into this? BTW - the SMF does not have a new version for WP7.1

thanks
Michael

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心作怪 2024-12-09 12:18:25

我也有同样的问题。因此,我开始深入研究这个问题,并找到了发生这种情况的原因。

问题是System.Windows.Interactivity。 SMF 和 MVVM Light 使用此 dll 的不同版本。
您必须确保 Microsoft.SilverlightMediaFramework.Utilities.Phone 项目和您的主项目引用相同的版本。

就我而言,我将 SMF 更新为参考版本 3.8.5.0。

如果您不想更新引用,则只需从 Microsoft.SilverlightMediaFramework.Utilities.Phone 项目中排除 NavigationBehavior.cs 类即可。

希望有帮助。

I had the same problem. So, I started digging into this problem and I found the reason why is this happening.

The problem is System.Windows.Interactivity. SMF and MVVM Light are using different versions of this dll.
You have to make sure that Microsoft.SilverlightMediaFramework.Utilities.Phone project and your main project are refering to the same version.

In my case I updated SMF to reference version 3.8.5.0.

If you do not want to update the reference, then you can simply exclude the NavigationBehavior.cs class from Microsoft.SilverlightMediaFramework.Utilities.Phone project.

Hope it helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文