I am trying to share DTO’s from my datalayer assembly between the client and WCF service. This works using svcutil, but doesn’t work when using VS2008. VS2008 generates it’s own DTO objects whereas svcutil uses the shared data type.
The svcutil parameters I used are:
'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
I read that VS2008 just calls svcutil behind the scenes, so why doesn’t it work? I really want to avoid adding a manual process to the build process.
I created a batch file which calls svcutil and added it as a pre-build task to avoid this being a manual operation. This has solved my problem, but I am still not sure why there is a different behaviour between svcutil and the vs2008 gui method.