Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# compiler
Recently I've added a service reference to e-conomic. However, this meant that the service reference is downloaded and compiled with my project every time I compile.
 
That takes a long long time, sometimes up to a minute, just to compile a relatively small project.
 
This is the web service: https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?wsdl
 
As you can see, the web service is quite massive, and that is why it takes so long every time I need to compile. Is there any way to make sure my project compiles, without having to recompile the web service over and over again?
 
It's growing quite frustrating.
 
I've already written quite a bit of code with this web service (Crying every time I needed to compile!), so it would be awesome if I didn't have to change that.
Posted 11-Jun-13 4:14am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can use MSBuild script with a task that calls wsdl.exe
<target name=""UpdateWebReference"><br" mode="hold" />    <Message Text="Updating Web Reference..."/>
    <Exec Command="wsdl.exe /o '$(OutDir)' /n '$(WebServiceNamespace)' '$(PathToWebServiceURL)'">
  </Target>
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Pasted from SO:
 
You can create a dedicated assembly to host the service proxy. Then reference this assembly in your main project(s). Finally tweak you MSBuild to not compile automatically the service project - assuming it's part of the same solution - and voila!
 
If an update should be made simply recompile the project manually.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 150
2 PIEBALDconsult 110
3 Richard MacCutchan 105
4 Sergey Alexandrovich Kryukov 104
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100