简体   繁体   English

Xrm.sdk和Sharepoint 2013

[英]Xrm.sdk and Sharepoint 2013

I need to take data from a Dynamic CRM 2013 tables using web services. 我需要使用Web服务从Dynamic CRM 2013表中获取数据。

In a Console Application I used microsoft.xrm.sdk.dll and it was so easy to make query using QueryExpression. 在控制台应用程序中,我使用了microsoft.xrm.sdk.dll,使用QueryExpression进行查询非常容易。

But now I need to do the same thing and represent data on an Application Page for SharePoint 2013 Project. 但是现在我需要做同样的事情,并在SharePoint 2013 Project的应用程序页面上表示数据。 And I used the same way, but there is exception: 而且我使用了相同的方式,但是有一个例外:

Could not load file or assembly "Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken= * ** * **** " or one of its dependencies. 无法加载文件或程序集“ Microsoft.Xrm.Sdk,版本= 5.0.0.0,区域性=中性,PublicKeyToken = * ** * **** ”或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

Why is it happening? 为什么会这样呢?

In your VS project --> expand References --> click on the Microsoft.Xrm.Sdk assembly --> lock at it's properties and make sure it's set to Copy Local = true. 在VS项目中->展开引用->单击Microsoft.Xrm.Sdk程序集->锁定其属性,并确保将其设置为Copy Local = true。

If that still doesn't work, try adding the Microsoft.Xrm.Sdk assembly to the SharePoint server GAC. 如果仍然不能解决问题,请尝试将Microsoft.Xrm.Sdk程序集添加到SharePoint服务器GAC。 On the server, run gacutil -i [path to assembly] 在服务器上,运行gacutil -i [path to assembly]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM