Did you know that svcutil with /r does not work for MessageContract
I was trying to generate WCF proxy (Client) using svcutil.exe Visual Studio 2008 version. I also need to use the /r parameter of the svcutil.exe, so the generated proxy code will not generate definition for the objetcs from my reference assemblies.
The command I use is something like:
svcutil.exe /async http://localhost:8080/MyService /r:"C:\My.dll" /tcv:Version35 /out:MyClient.cs
In case the assembly My.dll contain .NET object that mark as [MessageContract] the generated proxy still contain definition for the MessageContract objects, so I have to change these objects to DataContract objects and then the generated proxy was created as expected.
You also need to remember that if your reference objects (on My.dll) contain objects form other assembly, You have to include this assemblies also in your svcutil command. So you new command will look like:
svcutil.exe /async http://localhost:8080/MyService /r:"C:\My.dll" /r:"C:\MyOtherObjects.dll" /tcv:Version35 /out:MyClient.cs