Reputation: 429
How do you generate a service reference via the command line that replicates the output of adding a service reference in Visual Studio for a WinRT application.
I have tried using svcutil (using local schema files):
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"
This generates classes inheriting from System.Runtime.Serialization.IExtensibleDataObject which doesn't existing in WinRT and won't compile
I have also tried SLsvcUtil:
slsvcutil.exe http://Service1.svc?singleWsdl /namespace:*,My.Proxy.Namespace /out:"Proxy.cs" /language:CS /internal /enableDataBinding
This works, but doesn't generate Async methods, it generates call backs (which doesn't match the behaviour of adding a reference via Visual Studio)
Upvotes: 5
Views: 346