Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Instead of adding service references you should use svcutil.exe to generate <strong>one</strong> service proxy file for the endpoints all together.</p> <p>All service proxy classes are then together in the same namespace you specify with the command line switch /n.</p> <p>The svcutil.exe call has many parameters then. So I recommend you store it in a batch file or even more comfortable: Place the command call under Build Events in Visual Studio into "Pre-build event command line".</p> <p>Here is the svcutil call for my client which puts all proxy classes together in ServiceProxy.cs. Most likely you have to modify the path to svcutil.exe and of course the service URLs:</p> <pre><code>"%PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\bin\svcutil.exe" /noLogo /noConfig /out:"$(ProjectDir)ServiceProxy.cs" /t:code /i /l:cs /tcv:Version35 /ser:DataContractSerializer /ct:System.Collections.Generic.List`1 /n:*,Oe.Corporate.CRMFacade.Service.Test http://localhost:3615/Client010/MasterDataService.svc http://localhost:3615/Client010/BusinessPartnerService.svc http://localhost:3615/Client010/MarketingAttrService.svc http://localhost:3615/Client010/ProductTransactionService.svc http://localhost:3615/Client010/ProductDataService.svc http://localhost:3615/Client010/ActivityManagementService.svc http://localhost:3615/Client010/PromotionService.svc </code></pre> <p>UPDATE: I forgot to mention that the pre-build event will fail unless you add this to the bottom of your .csproj file right above the closing Project element:</p> <pre><code>&lt;Target Name="PreBuildEvent" Condition="'$(PreBuildEvent)'!=''" DependsOnTargets="$(PreBuildEventDependsOn)"&gt; &lt;Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" ContinueOnError="true" /&gt; &lt;/Target&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload