I want to create a .bat file so I can just click on it so it can run:
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service
Can someone help me with the structure of the .bat file?
I want to create a .bat file so I can just click on it so it can run:
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service
Can someone help me with the structure of the .bat file?
If you want to be real smart, at the command line type:
echo svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service >CreateService.cmd
Then you have CreateService.cmd
that you can run whenever you want (.cmd
is just another extension for .bat
files)
As described here, about the Start
command, the following would start your application with the parameters you've specified:
start "svcutil" "svcutil.exe" "language:cs" "out:generatedProxy.cs" "config:app.config" "http://localhost:8000/ServiceModelSamples/service"
"svcutil"
, after the start
command, is the name given to the CMD window upon running the application specified. This is a required parameter of the start
command.
"svcutil.exe"
is the absolute or relative path to the application you want to run. Using quotation marks allows you to have spaces in the path.
After the application to start has been specified, all the following parameters are interpreted as arguments sent to the application.
Well, the important point it seems here is that svcutil is not available by default from command line, you can run it from the vs xommand line shortcut but if you make a batch file normally that wont help unless you run the vcvarsall.bat file before the script. Below is a sample
"C:\Program Files\Microsoft Visual Studio *version*\VC\vcvarsall.bat" svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service