Space in Directory Parameter of svcutil.exe
- by Drew Frisk
I'm attempting to download metadata for a WCF service using svcutil but I'm running into issues with the /directory:< parameter. The directory I want to save to has a space in it:
C:\Service References\Logging
so when I execute /t:metadata I receive the following error:
Error: The directory 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\References\Logging' could not be found. Verify that the directory exists and that you have the appropriate permissions to read it.
It looks to me like the space in "Service References" is causing the issue. From my understanding of command shell (which is very little) spaces act as delimiters for an executable. So I tried escaping the space with a carrot
Service^ References
and surrounding the path in double quotes
"C:\Service References\Logging"
but neither of those seem to be working, as the /directory: parameter doesn't recognize them as valid characters in the value. I haven't been able to find any direction in regards to this and svcutil, so I'm at a loss right now.
I could download the files to a temp folder and then move them, but I would prefer not to take that approach.
I would appreciate any direction that could be given on trying to resolve this.
Thanks in advance.