<p>I have a web application written in C# that consumes several internal web services.  We have a development tier, a testing tier, and a production tier.  Also, we use the <code>WSDL.exe</code> command to generate a <code>Proxies.cs</code> file for a given tier's web services.</p>

<p>When we are ready to deploy our code up the stack from development to test or test to production, we need to run the <code>WSDL.exe</code> command to point to the appropriate version of the web services.</p>

<p>Is there a generally accepted way to automate this?</p>

[{'answer_id': 18056, 'author': 'stimms', 'author_id': 361, 'author_profile': 'https://Stackoverflow.com/users/361', 'pm_score': 3, 'selected': True, 'text': '<p>There are a number of way to do it.  A NAnt build script will do it, but I think the most commonly accepted method now is to use MSBuild.  See <a href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx" rel="nofollow noreferrer">MSDN</a> for details.</p>\n'}, {'answer_id': 24806, 'author': 'Page', 'author_id': 2657, 'author_profile': 'https://Stackoverflow.com/users/2657', 'pm_score': 1, 'selected': False, 'text': '<p>Our company uses a combination of NANT + Cruise Control + Custom Utility apps to build our products.  More specifically, the <a href="http://nant.sourceforge.net/release/latest/help/tasks/exec.html" rel="nofollow noreferrer"> task</a> in NANT will allow you to fire off those command-line applications such as WSDL.exe</p>\n'}]
['https://Stackoverflow.com/questions/17948', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2173/']