【问题标题】:Retrieve and generate WCF Reference.svcmap by command line or programmatically?通过命令行或以编程方式检索和生成 WCF Reference.svcmap?
【发布时间】:2019-01-14 19:12:33
【问题描述】:
【问题讨论】:
标签:
c#
wcf
visual-studio-2012
【解决方案1】:
使用开发者命令提示符:
“C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat”
svcutil http://www.webservicex.net/sendsmsworld.asmx
svcutil /t:metadata http://www.webservicex.net/sendsmsworld.asmx
这将生成:
output.config
SendSMSWorld.cs
www.webservicex.net.wsdl
我不确定 svcmap,这似乎是来自 Visual Studio 的东西
-= EXAMPLES =-
svcutil http://service/metadataEndpoint
- Generate client code from a running service or online metadata documents.
svcutil *.wsdl *.xsd /language:C#
- Generate client code from local metadata documents.
svcutil /dconly *.xsd /language:VB
- Generate Data Contract types in VisualBasic from local schema documents.
svcutil /t:metadata http://service/metadataEndpoint
- Download metadata documents from running services
svcutil myAssembly.dll
- Generate metadata documents for Service Contracts and associated types in
an assembly
svcutil myServiceHost.exe /serviceName:myServiceName
- Generate metadata documents for a service, and all associated Service
Contracts and data types in an assembly
svcutil myServiceHost.exe /dconly
- Generate metadata documents for data types in an assembly
svcutil /validate /serviceName:myServiceName myServiceHost.exe
- Verify service hosting
svcutil /t:xmlserializer myContractLibrary.exe
- Generate serialization types for XmlSerializer types used by any Service
Contracts in the assembly