문제

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?!

도움이 되었습니까?

해결책

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

다른 팁

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

/out:C:\fil1e.cs
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top