locked
Update service reference from the code? RRS feed

  • Question

  • At the moment, whenever I change something in .svc file in the ASP.NET project, I have to compile that project, on the first place, and then Update Service Reference manually. It's very tedious work if you have 10+ service references.

    Can I set in VS2008 settings that service references are automatically updated on build? For example, in such case I would only need to press F5 (or ctrl+F5) and all service references would be updated.

    Wednesday, March 10, 2010 6:03 AM

All replies

  • No such an option doesn't exist.
    Wednesday, March 10, 2010 8:29 AM
  • So you manually click on each service reference and choose Update??? Any faster way to do this task(s)?
    Thursday, March 11, 2010 5:49 AM
  • What about setting build events in project's properties (post-build events)?

    Does anyone know how can I update service references from the code so that I could use that code as post-build event?

    Friday, March 12, 2010 3:55 AM
  • Currently investigating the same problem. It's not a problem to invoke the svcutil.exe utility from build event... I wonder how to do that only in the case .svc file(s) really changed (to save time)... guess I'll need to write a MSBuild script...

    Tuesday, March 16, 2010 4:11 AM
  • Currently investigating the same problem. It's not a problem to invoke the svcutil.exe utility from build event... I wonder how to do that only in the case .svc file(s) really changed (to save time)... guess I'll need to write a MSBuild script...

     

    As I don't need to check if the files have been updated or not, could you tell me what to add in 'Post-build event command line' in order to update all service references after the project has been built?

    Thursday, March 18, 2010 6:01 AM