繁体   English   中英

错误1找不到类型或名称空间名称'ProductServiceClient'(您是否缺少using指令或程序集引用?)

[英]Error 1 The type or namespace name 'ProductServiceClient' could not be found (are you missing a using directive or an assembly reference?)

只是尝试创建一个wcf测试客户端。 我使用GardenClient.GardenServiceReference添加了一个服务客户端; 我使用2010 visual studio IDE在http://github.com/vboyz2knight/WcfGardenService上拥有该项目

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GardenClient.GardenServiceReference;


namespace GardenClient
{
    class Program
    {
        static void Main(string[] args)
        {
            //Trying to create a test client
            ProductServiceClient client = new ProductServiceClient();
        }
    }
}

您可能缺少wcf服务程序集参考。 您可以通过解决方案->项目->添加服务参考来添加它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM