繁体   English   中英

Dynamics CRM 2013 SDK帮助程序代码未编译

[英]Dynamics CRM 2013 SDK helper code not compiling

Dynamics CRM 2013 SDK附带了一些帮助程序类(不是解决方案,只是.cs文件),其中引用了Microsoft.IdentityModel和System.IdentityModel。 可以在以下位置找到使用这些类的CRM 2011指南( http://msdn.microsoft.com/zh-cn/library/gg328228.aspx),2013年尚无指南 由于两个不同的IdentityModel引用的歧义性,我无法构建.NET 4.5库项目。

我遵循指南1:1遇到的第一个错误是“ SecurityToken”。 新的CRM 2013类在顶部using System.IdentityModel.Tokens ,因此我添加了对using System.IdentityModel.Tokens的引用(在CRM 2011链接中未提及)。 然后我得到14个这样的错误

'WSTrustChannelFactory' is an ambiguous reference between 'System.ServiceModel.Security.WSTrustChannelFactory' and 'Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory'

有谁能够成功构建和使用CRM 2013的帮助程序? 我决定添加最后一个引用是否错误?

我现在尝试从SDK示例中使用WsdlTokenManager类构建项目,并且必须同时引用Microsoft.IdentityModelSystem.IdentityModel

在代码文件中,我必须添加以下两个用法:

using WSTrustChannel = Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel;
using WSTrustChannelFactory = Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory;

所以现在可以编译了,但是我还没有尝试运行代码来验证用户身份。

暂无
暂无

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

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