Click here to Skip to main content
11,637,662 members (91,125 online)
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 3: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 jyo.net 380
1 Sergey Alexandrovich Kryukov 309
2 stibee 308
3 OriginalGriff 230
4 sasanka sekhar panda 190
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,763
2 Mika Wendelius 6,999
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320


Advertise | Privacy | Mobile
Web02 | 2.8.150728.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2015
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