I was given a set of 170 WSDL files which I need to convert to C# class files. Is there any way to batch process this?
If you have all of them in a directory, you should probably run something like this:
$wsdls = gci | ? { $_.Name -like "*.wsdl" } | % { $_.Name }
Foreach ($wsdl in $wsdls) {
& "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\svcutil.exe" '$wsdl' /n:*,Your.Desired.Net.Namespace /o:'$wsdl'.cs /noconfig
}
If there are on subdirectories, you can easilly make this recursive, and if you only have a list of addresses you can put them all in a .txt file, then go trough the content and call svcutil on each line.
The important part is probably how to manage the namespace of the generated code, and how to name all these files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With