2010-10-06 37 views
0

当我尝试使用命令提示手动生成代理时,出现此错误wcf服务通过在命令提示符下使用svcutil.exe来创建代理?

设置使用Microsoft Visual Studio 2008 x86工具的环境。

C:\Program Files\Microsoft Visual Studio 9.0\VC>cd\ 

C:\>svcutil /language:cs /out:proxy.cs /config:app.config /http://localhost:2544 
/myservicewcf/Sasi.svc 
'svcutil' is not recognized as an internal or external command, 
operable program or batch file. 

C:\>svcutil.exe /language:cs /out:proxy.cs /config:app.config /http://localhost: 
2544/myservicewcf/sasi.svc 
'svcutil.exe' is not recognized as an internal or external command, 
operable program or batch file. 

C:\> 

u能帮助我,请

+0

在您的机器上搜索svcutil.exe。然后先执行CD“路径”,然后执行命令或在当前命令的命令行中提供完整路径“path”\ svcutil.exe。通常默认位置是C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ bin – InSane 2010-10-06 10:36:38

+0

ya我通过c:\ progaram文件但我没有在bin中找到任何东西Mr.InSane – 2010-10-06 10:46:08

回答

2

而是开始正常“CMD”的提示,启动“Visual Studio 2008的命令提示符”在你的Visual Studio的启动菜单项

+0

我正在使用Visual Studio命令提示符 – 2010-10-06 10:43:33

+0

C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ bin我在bin文件夹中找不到任何东西 – 2010-10-06 10:46:55

+0

您正在使用哪个版本的VS 2008? – 2010-10-06 10:52:55

1

我觉得路径值没有svcutil可用的路径值。从系统中找到实用程序可用的路径,并使用setpath命令或将路径值添加到环境变量Path。

0

你不需要提及整个事情,只要端点的地址能做到这一点,就像这样。

svcutil.exe http://'localhost':8080/MyService_endpoint 

从条命令删除“下面的语句

2

用来生成。

C:\Program Files\Microsoft Visual Studio 9.0\VC>svcutil.exe /t:code /language:cs "here your svc url" /out:urservice.cs /config:urservice.config 
相关问题