Export (0) Print
Expand All

Migrating your application to Lync 2013 Preview

[This is preliminary documentation and is subject to change.]

Learn how to migrate your existing Microsoft Lync 2010 SDK-enabled application to the Microsoft Lync 2013 Preview SDK. The migration tasks include changes to assemblies that are referenced in your project and the installation of the latest Microsoft Silverlight development support tools.

Important note Important

No code changes are required to recompile your existing Lync SDK-enabled application that references the Lync SDK assembly. Add new Lync SDK features to your application by using the classes and types described in What's New in Lync 2013 Preview SDK.

For Windows Forms or Windows Presentation Foundation (WPF) applications, you must replace the Microsoft.Lync.Model.dll assembly that was installed with Lync SDK. The Lync SDK installs a new set of assemblies with the same names as the Lync SDK assemblies. The assemblies for Lync SDK have a default %programfiles%\Microsoft Office\Office15\LyncSDK\Assemblies\Desktop installation path.

For Silverlight applications, you replace your existing Lync assemblies with the set of assemblies that are found in the %programfiles%\Microsoft Office\Office15\LyncSDK\Assemblies\Silverlight folder.

If you develop Silverlight browser applications that use the Microsoft Lync 2010 Controls and you are migrating these applications to the Microsoft Lync 2013 Preview Controls, you have to download and install the following tools.

The Microsoft Lync 2013 Preview client reads a different registry key to determine the UI suppression mode to run under. The new Lync 2013 Preview registry key:

  • [HKEY_CURRENT_USER]\Software\Microsoft\Office\15.0\Lync\UISuppressionMode

    Note Note

    If your Lync SDK-enabled application is intended to run under UI suppression with Lync 2013 Preview, you must set the Lync 2013 Preview key in addition to the registry key that is set for the Microsoft Lync 2010 client.

The mechanism for setting the location of trusted Silverlight applications that are hosted in a Microsoft Lync 2013 Preview conversation window extension has changed. To host your Microsoft Lync 2010 conversation window extension application in a Lync 2013 Preview conversation window, create a new key in the registry of the computer that is running the Lync 2013 Preview client. For example, if your application is hosted on a server configured for SSL/TLS, create a new key like the following key:

[HKEY_CURRENT_USER\Software\Microsoft\Office\Lync\Security\Trusted Sites\//MySite.com/]

Under the new key, add the following two 32bit dword values:

"https"=dword:00000001
"http"=dword:00000000

A code behavior change is a non-syntax API revision that changes the run-time behavior of a Lync 2013 Preview API-based application. Lync 2013 Preview API code behavior changes:

  • Different exception is raised.

    Collection classes that implement the this[System.Int32] property threw an IndexOutOfRange exception when an invalid index was specified. With the behavior change, an invalid index causes the ArgumentOutofRangeException exception to be raised. The Microsoft.Lync.Model.ContactEndpointCollection class shows an example of this change.

  • Different exception is raised.

    Collection classes that implement the this[someKey] property threw an IndexOutOfRange exception when an invalid key was specified. With the behavior change, an invalid key causes the KeyNotFoundException exception to be raised. The Microsoft.Lync.Model.ClientSettings class shows an example of this change.

  • Inactive spurious conversation objects can be created.

    The ConversationManager.ConversationAdded is raised when the Microsoft.Lync.Model.Conversation.Sharing.ContentSharingModalityModality.State property value of an existing conversation changes to ModalityState.Connected in the following circumstances:

    • UI Suppression is disabled

    • The signed in user has selected Enable tabbed conversations on the local Microsoft Lync 2013 Preview instance.

    • The signed in user has selected Reopen my conversations when I sign in to Lync.

    The Lync 2013 Preview API does not provide a way to see whether a user has enabled tabbed conversations or conversation reopening. To keep your application from reacting to the addition of a “shadow” conversation, examine the new conversation for two characteristics. First, the Conversation.SelfParticipant property returns null and second, none of the conversation modalities are in the ModalityState.Notified state. Check for these conversation characteristics in the ConversationManager.ConversationAdded event. If both characteristics are true of the new conversation, then it is a “shadow” conversation.

    The following example identifies a “shadow” conversation. This method should be called in the registered callback method for the ConversationManager.ConversationAdded event.

            /// <summary>
            /// Handles the event raised when a new conversation is added. 
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            void ConversationManager_ConversationAdded(object sender, ConversationManagerEventArgs e)
            {
    
                if (IsShadowConversation(e.Conversation))
                {
                    return;
                }
                //Your logic here...
            }
    
    
            /// <summary>
            /// Returns true if the new conversation is a "shadow" conversation that is
            /// created because the ContentSharingModality is now connected in an existing conversation
            /// where local user has enabled tabbed conversations, conversation state saving is enabled, and 
            /// UI Suppression is not enabled.
            /// </summary>
            /// <param name="newConversation"></param>
            /// <returns></returns>
            private Boolean IsShadowConversation(Conversation newConversation)
            {
                if (newConversation.SelfParticipant != null)
                {
                    return false;
                }
    
                foreach (Modality m in newConversation.Modalities.Values)
                {
                    if (m.State == ModalityState.Notified)
                    {
                        return false;
                    }
                }
                return true;
            }
    
    
    

Community Additions

Show:
© 2014 Microsoft