WinRT的命令行WCF参考

J_D*_*J_D 5 c# wcf svcutil.exe visual-studio windows-runtime

如何通过命令行生成服务引用,该命令行复制在Visual Studio中为WinRT应用程序添加服务引用的输出.

我尝试过使用svcutil(使用本地模式文件):

svcutil.exe /internal /enableDataBinding /collectionType:System.Collections.ObjectModel.ObservableCollection`1 /NoConfig /noLogo /out:"Proxy.cs" /namespace:*,My.Proxy.Namespace "bin\Proxy\*.*" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\WindowsBase.dll"
Run Code Online (Sandbox Code Playgroud)

这将生成继承自System.Runtime.Serialization.IExtensibleDataObject的类,该类在WinRT中不存在且不会编译

我也试过SLsvcUtil:

slsvcutil.exe http://Service1.svc?singleWsdl /namespace:*,My.Proxy.Namespace /out:"Proxy.cs" /language:CS /internal /enableDataBinding
Run Code Online (Sandbox Code Playgroud)

这有效,但不生成异步方法,它会生成回调(与通过Visual Studio添加引用的行为不匹配)