Wcf – Does Visual Studio 2008 Use SvcUtil.exe and if “No” is there any disadvantage to using svcutil

svcutil.exevisual-studio-2008wcf

After googling a bit there is no definite answer of whether Visual Studio 2008 uses svcutil.exe or not? Visual Studio 2005 did use it, but do the RTM versions of Visual Studio 2008 use svcutil? A few blogs say it doesn't (and make it seem surprising)

and other sites say it does.

The reason I'm asking is we are flattening our WCF wsdl with a custom endpoint behavior extension (an implementation of IWsdlExportExtension/IEndpointBehavior) and using the flattened wsdl via Visual Studio 2008's Add Reference gives us compile errors as it is duplicating Types/Classes. The reference is added without any errors. SvcUtil, on the other hand, throws the duplicate class into a seperate namespace which fixes the build issue.

So SvcUtil works, but Visual Studio 2008 doesn't on some of our flatten wsdls. We are fine with continueing to use svcutil if the Add Service Reference in Visual Studio doesn't work, but are wondering if anyone knows if there are any implications in doing so. I couldn't find any evidence that we "shouldn't" be using svcutil, just that it isn't as easy as using the Add Service Reference in Visual Studio 2008.

Best Answer

svcutil and VS2008 ultimately call into the same bit of WCF code. Whether it uses the actual exe or calls into a dll is a minor detail. If anything, I prefer the command line tool, as it allows more flexibility (or maybe I just like command line ;-p).

Note that WCF can re-use existing types, both via the IDE and from the command-line (/r?). But this type of namespace issue is just one of many things I prefer about using the command-line version.