【问题标题】:Project does not build after updating a service reference更新服务引用后项目未构建
【发布时间】:2014-06-06 13:05:27
【问题描述】:

更新服务参考后构建项目时出现以下错误:

不包含“DefaultResolveType”的定义

自动生成的 Reference.cs 会引发错误,但 DefaultResolveType 方法应该在生成的类中,因为它是从“this”关键字调用的。自上次成功构建以来,数据服务未更改,客户端代码未更改。

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]

protected global::System.Type ResolveTypeFromName(string typeName)
{
    global::System.Type resolvedType = this.DefaultResolveType(typeName, "Microsoft.Crm.Sdk.Data.Services", "ITF.DataAccessLayer.CRM.CrmAccessService");
    if ((resolvedType != null))
    {
        return resolvedType;
    }

    return null;
 }

【问题讨论】:

    标签: c# .net wcf service-reference


    【解决方案1】:

    好的..我已经想出了如何解决这个问题:

    • 右键单击项目
    • 点击“管理 NuGet 包”
    • 卸载 WCF 数据服务客户端(已安装 5.6 版),它将删除其他依赖包
    • 通过单击左侧的在线选项卡重新启动 WCF 数据服务客户端 (5.6.1)

    这个包的5.6版好像有问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-01
      • 2011-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多