我收到以下错误消息:
找不到类型或命名空间名称“ServiceClient”(您是否缺少 using 指令或程序集引用?)
我只是想实例化 ServiceClient 并且它不认为它是服务的一部分。
它以前可以工作,但后来我删除了默认界面,添加了一个文件夹,然后将新界面放置在该文件夹中。这是我的服务结构目前的样子:
关于我在这里做错了什么的任何想法?
I fixed it. When I removed the original interface and added a new one, the name of the client changed from what I was expecting it to be, to the name of the new interface. So I added the original interface back and named it what it was. Instead of letting the service inherit each interface, I'll have it inherit the main one and then the main one will inherit the rest. So we stay with just one client name.