0

I am using one of the DLL file which is provided by Lync Client 2013 SDK (Microsoft.Lync.Model.dll -- version 15.0.4454.1509) in C++ code (with /CLR support). But during building the project it is not giving me any errors relevant to the code of Lync SDK class. But at run-time it is throwing me an error message:

(An unhandled exception of type 'System.IO.FileNotFoundException' occurred in scanuser.exe Additional information: Could not load file or assembly 'Microsoft.Lync.Model, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.)

//DLL I want to use
#using <Microsoft.Lync.Model.dll>

//namespace provided that DLL
using namespace Microsoft::Lync::Model;

//Function which is using that DLL
void getusername()
{
LyncClient ^lyncClient;
String     ^text=lyncClient->Self->Contact->GetContactInformation(ContactInformationType::DisplayName)->ToString();
Console::WriteLine(text);

}

I also added "Additional #using Directories" in which that DLL file is present that is: "C:\Program Files\Microsoft Office\Office15\LyncSDK\Assemblies\Desktop"

This DLL is working fine in sample applications which is written in C#. So I guess there is no problem with the sub-version of DLL

Visual Studio 2012 Ultimate,Windows 7 Ultimate 32 bit,Lync Client SDK 2013

So any ideas what's going on?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
work_in_progress
  • 747
  • 1
  • 10
  • 27
  • This is a problem when you use `#using`, that won't copy the DLL to your build directory. Add a reference instead. – Hans Passant Mar 15 '13 at 19:02
  • Thanks a lot. Problem solved just by adding reference of that DLL. Will you please elaborate on this issue as I am not used to with C++ having CLR support. – work_in_progress Mar 15 '13 at 19:46

0 Answers0