簡體   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