Link to home
Create AccountLog in
Avatar of aconsulting
aconsultingFlag for Sweden

asked on

Dynamic reference to a web service

Hi,

What is the best practice for making the url of a web reference in Visual Studio to be dynamic(dev vs other envoirments) without having to manually change the reference and rebuild?


Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Erick37
Erick37
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of b_levitt
b_levitt

With the exception of a mobile project, I beleive the proxy class url's are always placed in the config file so you should never have to regenerate the proxy class reference just to change the url.  

If you're talking automatic selection based on a Debug or Release (or even a QA) build, then I think the new transformations feature in vs 2010 would be my first option:
http://geekswithblogs.net/EltonStoneman/archive/2010/08/20/using-msbuild-4.0-web.config-transformation-to-generate-any-config-file.aspx

What version of VS are we talking here?  What type of project is this?