代码之家  ›  专栏  ›  技术社区  ›  ptutt

使用VS 2008在WCF中共享类型无效

  •  0
  • ptutt  · 技术社区  · 16 年前

    我使用的svcutil参数有:

    "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcUtil" 
              /serializer:DataContractSerializer
              /language:vb 
              /out:ServiceClient.cs
              /namespace:*,CommonWCF 
              /noconfig
              /reference:"D:\trunk\DataLayer\bin\Debug\DataLayer.dll"
              /collectionType:System.Collections.Generic.List`1
              http://localhost:3371/Common.svc
    

    我读到VS2008只是在幕后调用svcutil,为什么它不起作用?我确实希望避免在构建过程中添加手动过程。

    3 回复  |  直到 16 年前
        1
  •  4
  •   oefe    16 年前

    只用 ClientFactory<T> .

        2
  •  0
  •   Preet Sangha    16 年前

    如果您避免使用服务引用,而只包括对svcutil生成的代码的引用,那么这应该可以避免这个问题。我们的DTO位于共享程序集中。

        3
  •  0
  •   ptutt    16 年前