0

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 Answers1

0

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"

Paul Nearney
  • 6,965
  • 2
  • 30
  • 37
  • Awesome! Would you mind providing a small explanation? –  Aug 13 '18 at 14:17
  • 1
    I'd love to, but I have no idea why the reference requires this! it's a fairly complex subject, some info here: https://stackoverflow.com/questions/20514240/whats-the-difference-setting-embed-interop-types-true-and-false-in-visual-studi – Paul Nearney Aug 13 '18 at 14:40