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

后端 未结 13 1800
难免孤独
难免孤独 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:23

    When you add a service reference, there are two ways the types that are used by the service can be handled:

    • The types are stored in a dll, and that dll is referenced from both the client and the server application.
    • The types are not in a dll referenced by the client. In that case the tool that creates the service reference, will create the types in the references.cs file.

    There are many things that can go wrong. We have found that if the tool crashes, it is sometimes faster to delete the service reference and start again.

    We have stopped using service reference. For projects where we have control of the client and the service, we use the method described in this screencast.

提交回复
热议问题