开发者

Lync API using PresenceIndicator outputting TypeInitializationException within InitializationCompleted

开发者 https://www.devze.com 2023-04-12 17:04 出处:网络
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 Presen开发者_运维知识库ceIndica

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 Presen开发者_运维知识库ceIndicator 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?


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.

0

精彩评论

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

关注公众号