0

我正在使用由 Lync Client 2013 SDK(Microsoft.Lync.Model.dll -- 版本 15.0.4454.1509)在 C++ 代码(支持 /CLR)中提供的 DLL 文件之一。但是在构建项目期间,它没有给我任何与 Lync SDK 类的代码相关的错误。但是在运行时它向我抛出了一条错误消息:

(scanuser.exe 中发生了“System.IO.FileNotFoundException”类型的未处理异常附加信息:无法加载文件或程序集“Microsoft.Lync.Model,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c”或一个其依赖关系。系统找不到指定的文件。)

//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);

}

我还添加了“附加 #using 目录”,其中存在该 DLL 文件,即:“C:\Program Files\Microsoft Office\Office15\LyncSDK\Assemblies\Desktop”

此 DLL 在用 C# 编写的示例应用程序中运行良好。所以我想DLL的子版本没有问题

Visual Studio 2012 Ultimate,Windows 7 Ultimate 32 位,Lync 客户端 SDK 2013

那么有什么想法吗?

4

0 回答 0