我正在将服务引用(到 Exchange Web 服务)添加到我的项目中,并且在构建时遇到了一个模棱两可的引用错误。(Resharper 实际上给了我一个设计时错误,VS 不是)
我正在使用 AutoMapper(有用的库https://github.com/AutoMapper/AutoMapper/wiki)将我的业务实体映射到 DAL,并且编译器向我保证 System.SerializationAttribute 存在于 AutoMapper 程序集和 mscorlib 中。它在 AutoMapper 程序集中不存在,所以我想这有点像红鲱鱼......
我有点困惑 - 如果我删除服务引用,我可以毫无问题地使用 System.SerializationAttribute 装饰器。一旦我添加对 EWS 的服务引用,整个项目中的任何 System.SerializationAttribute 装饰器都会出现此错误!这给了我一个线索,即引用正在造成歧义,但在哪里?
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.450")]
[System.SerializableAttribute()] <-- ambiguous ref issue with this decorator
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/exchange/services/2006/types")]
public enum RuleValidationErrorCodeType {
我还有另一个问题,当我尝试将其添加为网络参考时,我无法进入“添加网络参考”对话框。我只是得到一个“无法为对话框创建控件”。有人见过吗?