gpt4 book ai didi

c# - 更新服务引用后项目未构建

转载 作者:行者123 更新时间:2023-12-03 03:03:44 24 4
gpt4 key购买 nike

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

不包含“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;
}

最佳答案

好的..我已经弄清楚如何解决这个问题:

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

这个包的 5.6 版本似乎有问题

关于c# - 更新服务引用后项目未构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24082564/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com