Project does not build after updating a service reference

家住魔仙堡 提交于 2020-01-02 12:09:51

问题


I get the following error building my project after updating a service reference:

does not contain a definition for 'DefaultResolveType'

The error is thrown on the auto-generated Reference.cs, but the DefaultResolveType method should be in the generated class as it is called from the 'this' keyword. The data service hasn't changed and the client code hasn't changed since the last successful build.

[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;
 }

回答1:


OK.. I've figured out how to fix this:

  • Right-click on the project
  • Click 'Manage NuGet Packages'
  • Uninstall WCF Data Services Client (version 5.6 was installed), it will remove other dependant packages
  • Resinatall the WCF Data Service Client (5.6.1) through clicking the online tab on the left

Seems like there is a problem with version 5.6 of this package



来源:https://stackoverflow.com/questions/24082564/project-does-not-build-after-updating-a-service-reference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!