Lync SDK 2013 File not found exception in Skype for Business 2016

416 Views Asked by At

I am totally new to the Lync SDK. I took some "getting started" information from here

https://blog.thoughtstuff.co.uk/2014/08/microsoft-lync-desktop-development-how-to-get-started/

After creating a new windows forms project I executed this code on my form

public partial class FrmMain : Form
{
    public FrmMain()
    {
        InitializeComponent();
        LyncClient client = LyncClient.GetClient();
        Console.WriteLine(client.State);
    }
}

I logged into my Skype Desktop Application before running the code and got this error

System.IO.FileNotFoundException: "Could not load file or assembly "Microsoft.Office.Uc, Version=15.0.4603.1000, Culture=neutral, PublicKeyToken=token" or one of its dependencies. The system cannot find the file specified."

What do I have to fix here?

1

There are 1 best solutions below

2
Paul Nearney On BEST ANSWER

Assuming you've already added the reference to Microsoft.Office.Uc, select it in Solution Explorer, and in the properties window ensure Embed Interop Types is set to "False"