2015-03-13 65 views
0

我试图用这个链接声明步骤连接到CRMDynamics CRM中xrm.cs编译错误

https://msdn.microsoft.com/en-us/library/gg695790.aspx

错误

Server Error in '/' Application. 

Compilation Error 

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0012: The type 'System.Data.Services.IUpdatable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 

Source Error: 


Line 192816: /// </summary> 
Line 192817: [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "7.0.0000.3543")] 
Line 192818: public partial class XrmServiceContextr : Microsoft.Xrm.Client.CrmOrganizationServiceContext 
Line 192819: { 
Line 192820:   

Source File: c:\Users\Gevor\Documents\Visual Studio 2013\Projects\TestCRM\TestCRM\App_Code\Xrm.cs Line: 192818 

命令行参数

c:\ Dyna micsCRM \ SDK \ BIN> CrmSvcUtil.exe /out:Xrm.cs /URL:https://Organization/XRMServices/2011/Organization.svc /域:域/用户名:用户名/密码:password /命名空间:XRM /serviceContextName:XrmServiceContextr /codeCustomization:"Microsoft.Xrm .Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration”

回答

0

如果System.Data.Services不是GAC,它需要在您的程序集中进行合并,而不仅仅是引用。

0

你需要一个System.Data.Services引用添加到您的应用程序TestCRM。

+0

所有需要的引用已经附加(也附加了System.Data.Services) – Gevorg 2015-03-14 09:12:58