Dynamics CRM 2013 SDK 附带一些帮助程序类(不是解决方案,只是 .cs 文件),它们引用 Microsoft.IdentityModel 和 System.IdentityModel 等内容。使用这些类的 CRM 2011 指南可以在这里找到 ( http://msdn.microsoft.com/en-us/library/gg328228.aspx),2013年还没有指南。由于两个不同的 IdentityModel 引用不明确,我无法构建 .NET 4.5 库项目。
遵循指南 1:1 后我遇到的第一个错误是找不到“SecurityToken”。新的 CRM 2013 类
using System.IdentityModel.Tokens
位于顶部,因此我添加了对(CRM 2011 链接中未提及)System.IdentityModel 的引用。然后我得到14个这样的错误
'WSTrustChannelFactory' is an ambiguous reference between 'System.ServiceModel.Security.WSTrustChannelFactory' and 'Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory'
有没有人能够成功构建和使用 CRM 2013 的助手?我添加最后一个参考的决定是错误的吗?