Freigeben über


Referencing Lync Managed Assemblies (Lync 2010 SDK)

In order to add a Microsoft Lync 2010 API reference to your application, you need to add Microsoft.Lync.Model.dll to your project references. You will use the classes in any of six Lync namespaces in your code.

Lync API Assembly Reference

The following figure is taken from a custom application solution that includes a project (ChangePrivacyRelationship) that lets a local user change the privacy relationship of any contact.

Hh378548.OCOMSolutionExplorer(en-us,office.14).jpg

Microsoft.Lync.Model.dll is not added to the global assembly cache on your computer during Microsoft Lync 2010 SDK installation. Instead, you must navigate to the install location of these files and select them for inclusion in your project references. You import the Microsoft.Lync.Model assembly with the following statement: using Microsoft.Lync.Model;.

Adding Assemblies to Your Project

  1. Right-click on the References folder under your project icon in the Solution Explorer window of Visual Studio.

  2. Choose Add Reference... to open the Add Reference dialog.

  3. On the Browse tab, navigate to the Lync SDK assembly install folder. Ensure Files of type: is set to "Component Files".

  4. Select Microsoft.Lync.Model.dll.

When the Add Reference dialog closes, you will see the two selected dll files in your reference folder.

Add the following statement to your class source file before the namespace statement: using Microsoft.Lync.Model;

See Also

Concepts

Writing Lync 2010 SDK Applications