【发布时间】:2015-07-23 17:28:57
【问题描述】:
我是 Lync 的新手。我在 VS 2013 和 VS 2012 上使用 Lync SDK 2013 开发了第一个 C# 应用程序。我按照this tutorial 为我的 winform 应用程序如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Lync.Model;
namespace LyncStart
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var lyncClient = LyncClient.GetClient();
MessageBox.Show(lyncClient.State + "");
}
}
}
但是当我运行应用程序时,出现错误:
在 LyncStart.exe 中出现“System.TypeInitializationException”类型的未处理异常 附加信息:“Microsoft.Lync.Model.LyncClient”的类型初始化程序引发了异常。
我应该如何解决这个问题?
【问题讨论】: