2011-02-02 82 views

回答

127

輸入Microsoft Visual Studio Command Promptwhere svcutil.exe。在我的機器是在:C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcUtil.exe

+14

開發人員命令提示符我得到了它。打開Visual Studio命令提示符,然後輸入「where svcutil.exe」。 礦低於: C:\ Program Files文件\微軟的SDK \的Windows \ v7.0A \ BIN \ NETFX 4.0工具\ svcutil.exe的 或 C:\ Program Files文件\微軟的SDK \的Windows \ v7.0A \ bin \ SvcUtil.exe – nellbryant 2011-02-02 17:55:58

+2

很高興知道** where命令。 – Veverke 2015-09-03 11:22:38

+2

命令「where」無效。 – Roel 2015-12-03 14:18:40

4

嘗試通過svcutil.exe的用命令生成代理類

語法:

svcutil.exe /language:<type> /out:<name>.cs /config:<name>.config http://<host address>:<port> 

例子:

svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceSamples/myService1 

要檢查服務是可用的嘗試在您的IE瀏覽器的例子沒有myService1後綴

13

如果你正在使用VS 2010,那麼你可以得到它在

C:\ Program Files文件(x86)的\微軟的SDK \的Windows \ v7.0A \ BIN \ NETFX 4.0工具

3

要找到任何文件的位置

  1. 在Windows開始菜單的搜索框中svcutil.exe的
  2. 等待
  3. 類型結果來填充
  4. 右鍵單擊svcutil.exe的,選擇「打開文件位置」
  5. 複製Windows資源管理器的路徑
3

我不認爲找到svcutil.exe的位置是非常重要的。 您可以使用Visual Studio命令提示符下直接沒有它的絕對路徑來執行,

Syntax: 
svcutil.exe /language:[vb|cs] /out:[YourClassName].[cs|vb] /config:[YourAppConfigFile.config] [YourServiceAddress] 

example: 
svcutil.exe /language:cs /out:MyClientClass.cs /config:app.config http://localhost:8370/MyService/ 
相關問題