MS CRM 2011 CrmSvcUtil给出错误 [英] MS CRM 2011 CrmSvcUtil gives error
问题描述
C:\TMP\sdk\microsoft.xrm\tools> crmsvcutil.exe / connectionString:Authentication Type = AD; Server = myip; User ID = myusername; Password = xxx/ generate:cs /out:schema.cs / namespace:Xmr dataContextClassName:XrmServiceContext
这样,直到我得到一个引发异常的行:
为名为subscriptionclients的实体构建源代码'...
pre>
为名为'subscriptionsyncinfo'的实体构建源代码...
构建名为subscriptiontrackingdeletedobject的实体的源代码...
未处理的异常:系统.InvalidOperationException:Sequence在System.Linq.Enumerable.Single [TSource](IEnumerable`1 source,Func`2谓词)中没有匹配的元素
$ cr $ s
在CrmSvcUtil.Generator.GenerateEntityCode(XElement entityElement,String outputNamespace ,DirectoryInfo outputDirectory,Boolean useL ogicalNames,StreamWriter outputWriter)
在CrmSvcUtil.Generator.Generate(IDictionary`2参数)
在CrmSvcUtil.Program.Main(String [] args)
任何人都知道这是什么意思?
当抛出这个异常时,我仍然有很多实体生成,但并不是全部,这使得我的cs文件被破坏。解决方案所以经过几个月的其他工作,我回到了这个问题,并通过这个博客找到解决方案。 http:// blog。 abodit.com/2011/03/crmsvcutil-exe-with-microsoft-dynamics-crm-2011-online-problem/
Im trying to use the CrmSvcUtil with the following command:
C:\TMP\sdk\microsoft.xrm\tools>crmsvcutil.exe /connectionString:"Authentication Type=AD; Server=myip; User ID=myusername; Password=xxx" /generate:cs /out:schema.cs /namespace:Xmr dataContextClassName:XrmServiceContext
And this works until I Get to a line that throws a exception:
Building source code for the entity named 'subscriptionclients'... Building source code for the entity named 'subscriptionsyncinfo'... Building source code for the entity named 'subscriptiontrackingdeletedobject'... Unhandled Exception: System.InvalidOperationException: Sequence contains no matching element at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate) at CrmSvcUtil.Generator.GenerateEntityCode(XElement entityElement, String outputNamespace, DirectoryInfo outputDirectory, Boolean useLogicalNames, StreamWriter outputWriter) at CrmSvcUtil.Generator.Generate(IDictionary`2 arguments) at CrmSvcUtil.Program.Main(String[] args)
Anyone know what this means? When this exception is thrown I still have a lot of entities generated but not all of them and this makes my cs file broken
解决方案So after a few months of doing other stuff I got back to this problem and find the solution via this blog. http://blog.abodit.com/2011/03/crmsvcutil-exe-with-microsoft-dynamics-crm-2011-online-problem/
这篇关于MS CRM 2011 CrmSvcUtil给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!