Question

I'm getting tired so kick me if I'm missing something very obvious. When I execute the following in PowerShell:

'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\SvcUtil.exe http:
//.../Test01.svc?wsdl /out:fil1e.cs /config:file2.config'

I'm expecting file1.cs and file2.config to appear in the current directory as well as some informative text to be printed in the prompt window. However, I get neither.

I've checked that the SvcUtil.exe is at that location (running just it gives me those larget-that-characters). I've checked that the service is up and running (the link is copied from the info displayed when accessing it).

I can create a service reference in VS12 and then it works as supposed to but I'm very curious as to why I can't get it to be executed from the command line of Power Shell.

What do I miss?!

Was it helpful?

Solution

I think you may have a bug there... I'm not sure that you can have spaces in the filename of the executable or command arguments unless you wrap them in quotes.

Instead of: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\SvcUtil.exe http: //.../Test01.svc?wsdl /out:fil1e.cs /config:file2.config'

perhaps use: '"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\SvcUtil.exe" http: //.../Test01.svc?wsdl /out:file1.cs /config:file2.config'

note: /out:fil1e.cs ==> /out:file1.cs

OTHER TIPS

It wont work unless you also give your output a full path, like so:

/out:C:\fil1e.cs
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top