What does this WCF error mean: “Custom tool warning: Cannot import wsdl:portType”

后端 未结 13 1834
难免孤独
难免孤独 2020-11-29 17:38

I created a WCF service library project in my solution, and have service references to this. I use the services from a class library, so I have references from my WPF applic

13条回答
  •  天涯浪人
    2020-11-29 18:16

    One downside of turning off 'reuse types in referenced assemblies' is that it can cause issues with ambiguous references. This is due to the service reference creating those objects again in the reference .cs file, and your code implementing the service may be referencing them from the original namespace.

    When this scenario occurs I find it useful to check the 'reuse types in specified referenced assemblies' which allows me to choose the ones with ambiguous references only, which resolves the issue quickly that way.

    Hope it helps someone else.

提交回复
热议问题