VS2010 SvcUtil.exe command not recognized
I am attempted to generate a proxy through the SvcUtil.Exe tool that if offered on the visual studio command line. I have checked开发者_StackOverflow in the default directory where this resides, and I have seen that the executable is there in the following directory
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
I have my client which I am attempting to generate a proxy for at
C:\Users\Eric\Documents\Visual Studio 2010\Projects\WcfServiceConsole
As directed by MSDN, I have navigated to the directory of my client, and I have used the following command:
svcutil.exe /language:cs /out:generatedProxy.cs /config: app.config http:
//localhost:8000/service
I am getting the usual error response from the command line:
"svcutil.exe is not recognized as an internal or external command, operable program
or batch file".
What can I do sot hat I can navigate to my project's solution, and then use this tool?
You can either set the path of the svcutil that you want to use in the path variables, or specify the full path C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\svcutil.exe /language:cs /out:generatedProxy.cs /config: app.config http: //localhost:8000/service
To set this path permanently in your command prompt:
Go to Control Panel >> System >> Advanced Tab >> Environment Variables
In System Variables, select the PATH row and click Edit:
Then, paste the directory C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ and click Ok:
Now, you can use the command without typing the full directory.
If you have installed any Version of Visual Studio, just open the "Developer Command Prompt" which comes by default with a lot of development tools like "svcutil":
The "Developer Command Prompt" is the same as a normal "cmd" window, but has some useful commands included specially for developers. To open it, just search for it in the Search/Run taskbar:
精彩评论