那不是错误消息。我会说只是信息,甚至不是警告......
我猜你有类似下面的配置并尝试在 net.pipe 上运行 svcutil。
<service name="Service" ...>
<host>
<baseAddresses>
<add baseAddress="net.pipe://localhost/" />
</baseAddresses>
</host>
<endpoint address="Service"
binding="netNamedPipeBinding"
contract="IService" />
<endpoint address="Service/mex"
binding="mexNamedPipeBinding"
contract="IMetadataExchange" />
</service>
...
<serviceMetadata httpGetEnabled="False" />
svcutil 将给出类似“此 URL 不支持 DISCO”的消息,并且仍然成功生成文件
现在您可以将 serviceMetadata 更改为
<serviceMetadata httpGetEnabled="True" httpGetUrl="http://localhost:8182/Service/mex" />
并运行例如
svcutil.exe /t:code /l:cpp /ser:Auto http://localhost:8182/Service/mex
它将生成与在 net.pipe 上运行相同的客户端代理代码,但现在具有以下输出...
Attempting to download metadata from 'http://localhost:8182/Service/mex' using WS-Metadata Exchange or DISCO.