CRM 插件服务器连接缺少参考

CRM Plugin Serverconnection missing reference

我正在使用 sdk 附带的 crm 示例中的示例代码,但此错误一直显示。如何添加此服务器连接缺少参考?我一头雾水,找不到在哪里添加呢?或者它属于哪个命名空间?

这是crm在线的连接码希望大家多多指教:

ClientCredentials Credentials = new ClientCredentials();
Credentials.UserName.UserName = UserName;
Credentials.UserName.Password = Password;
Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
Uri OrganizationUri = new Uri(Crmserverurl);
Uri HomeRealmUri = null;
using (OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(OrganizationUri, HomeRealmUri, Credentials, null))
{
    crmSvc = (IOrganizationService)serviceProxy;
}