使用 PresenceIndicator 的 Lync API 在 InitializationCompleted 中输出 TypeInitializationException

发布于 2024-12-09 02:21:45 字数 676 浏览 5 评论 0原文

我在 WPF 应用程序中使用 Lync API。我使用了培训套件中的 Office365 Lync Lab 9.1。但是,当我将代码移至 WPF 应用程序中时,PresenceIndicator 或 ContactList 不起作用。显示控件,但不显示 Lync 用户的状态。我使用的帐户与 Office365 Training Lab 9.1 中使用的帐户完全相同。

当我添加日志记录时,我会显示类似于以下 PresenceIndicator 的错误:

Applying template...

Control 'PresenceIndicator' entering 'OnLoaded'

UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException

我也在尝试 ContactList 并且正在输出:

UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException

此外,InitializationCompleted 事件中的 InitializationError 属性也显示未知错误。我该如何进一步解决这个问题?

I am using the Lync API within a WPF application. I have used the Office365 Lync Lab 9.1 within the training kit. However when I move the code into my WPF application the PresenceIndicator or ContactList doesn't work. The controls are displayed however the status of the Lync user is not shown. I am using the exact same accounts that are working within the Office365 Training Lab 9.1.

When I add logging I am shown errors like the following for the PresenceIndicator:

Applying template...

Control 'PresenceIndicator' entering 'OnLoaded'

UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException

I am also trying the ContactList and that is outputting:

UCClientInitializationFailed:Failed to Create Provider. Error Type: TypeInitializationException

Also the InitializationError property within the InitializationCompleted event is showing an Unknown error. How would I troubleshoot this issue further?

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

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

发布评论

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

评论(1

¢蛋碎的人ぎ生 2024-12-16 02:21:45

这完全是在黑暗中进行的尝试,但您是否正在尝试向以前从未与 Lync 集成的现有 WPF 应用程序添加控件?

您的应用程序中可能缺少引用 - 请仔细检查 %program files%\Microsoft Lync\SDK\Assemblies\Desktop

  • Microsoft.Lync.Controls.dll
  • Microsoft.Lync.Controls.Framework 中是否有对以下文件的引用.dll
  • Microsoft.Lync.Model.dll
  • Microsoft.Lync.Utilities.dll
  • Microsoft.Office.Uc.dll

另外值得检查的是:

  • 您的应用程序是针对 .NET Framework 3.5 或 4 构建的吗?
  • 您正在为 AnyCPU 进行构建吗?

如果这没有帮助,您可以尝试使用 Visual Studio 中的“Lync WPF 应用程序”模板创建新的 WPF 应用程序。如果工作正常,则将其与您的应用程序进行比较,以了解引用、配置等方面的任何差异。

MSDN 页面可能有用。

This is a complete stab in the dark, but are you attempting to add controls to an existing WPF application that has never integrated with Lync before?

It may be that you are missing references in your app - double-check you have references to the following files in %program files%\Microsoft Lync\SDK\Assemblies\Desktop

  • Microsoft.Lync.Controls.dll
  • Microsoft.Lync.Controls.Framework.dll
  • Microsoft.Lync.Model.dll
  • Microsoft.Lync.Utilities.dll
  • Microsoft.Office.Uc.dll

Also worth checking:

  • Is your app builing against .NET Framework 3.5 or 4?
  • Are you building for AnyCPU?

If that doesn't help, you could try creating a new WPF application using the "Lync WPF Application" template in Visual Studio. If this works correctly, then compare this against your appplication for any differences in references, configuration etc.

This MSDN page may be useful.

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