无法访问Microsoft.Xrm命名空间 [英] Can't access Microsoft.Xrm namespace

查看:175
本文介绍了无法访问Microsoft.Xrm命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了CRM Dynamics SDK,并将其保存在本地目录中.在我的代码中,我正在使用EntityCollection(与Xrm名称空间相关的其他类),这意味着我需要添加using Microsoft.Xrm.Sdk;.

I've downloaded CRM Dynamics SDK and keep it in a local directory. In my code, I'm using EntityCollection (amongst other classes related to Xrm namespace), which means that I need to add using Microsoft.Xrm.Sdk;.

问题是在编译过程中我收到以下错误消息:

The problem is that during compilation I get errors saying that:

名称空间"Microsoft"中不存在类型或名称空间名称"Xrm"(您是否缺少程序集引用?)

The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

因此,我再次检查是否已进行引用,并且非常准确地看到,microsoft.xrm.sdk确实是 在我的列表中.可以肯定的是,我已经删除了它,并通过指向具有相同名称的DLL再次添加了它.不过,毫无用处……令人吃惊的是,我的同事使用相同的代码,并且在他的机器上编译(唯一的区别是他在Win 7上,而我在Win 8上.)

So, I double check that the reference is made and, very accurately, I see that microsoft.xrm.sdk indeed is in my list. Just to be sure, I've removed it and added it again by pointing to the DLL with the same name. To no avail, though... The flabbergasting thing is that my colleague uses the same code and it compiles on his machine (the only difference being that he's on Win 7 and I'm on Win 8).

我们如何解决这个问题?

How do we kill this problem?

推荐答案

仔细检查项目设置,以查看正在使用的目标框架.如果它是 .NET Framework 4客户端配置文件,请尝试将其更改为 .NET Framework 4 .

Double check in your project settings to see which Target Framework you are using. If it is .NET Framework 4 Client Profile try changing it to .NET Framework 4.

这篇关于无法访问Microsoft.Xrm命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆