Is it possible to use svcutil to reuse/exclude referenced types, as with visual studio.
I have multiple projects, my types/datamodels are stored in separate assembli
Thanks for your help. Got this working eventually with the following commands:
SET BACKENDROOT=C:\SomePath\Development\Backend\bin
SET DATAMODELSBASE=C:\SomePath\Development\DataModels\bin
SET OUTFOLDER=C:\SomeOutputFolder
SET REFRENCED_ASSEMBLIES=/r:%DATAMODELSBASE%\Jall.DataModels.Consignment.dll
SET REFRENCED_ASSEMBLIES=%REFRENCED_ASSEMBLIES% /r:%DATAMODELSBASE%\Jall.DataModels.SomethingElse.dll
SET SVCFLAGS=/enableDataBinding /s /a /tcv:Version35
::Generate metadata
svcutil %BACKENDROOT%\Jall.Backend.Consignment.DLL /t:metadata -d:%OUTPUTFOLDER%
::Generate proxy with shared types
svcutil %OUTPUTFOLDER%\*.wsdl %OUTPUTFOLDER%\*.xsd %SVCFLAGS% /ser:DataContractSerializer %REFERENCED_ASSEMBLIES /o:test.cs
Note that the /ser:DataContractSerializer had to be used for this to work. And another annoyance is that if types such as datatables/datasets etc is used (not that they really should though) their assemblies have to be included or svcutil will mess up generating the metadata.
IE:
SET SHAREDASSEMBLIES=%SHAREDASSEMBLIES% /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll