Best way to switch configuration between Development/UAT/Prod environments in ASP.NET?
I need to switch among 3 different environments when developing my web app – Development, UAT, and Prod. I have different database connections in my configuration files for all 3. I have seen switching these settings done manually by changing all references and then rebuilding the solution, and also done with preprocessor directives. Is there an easy way to do this based on some variable so that the configuration doesn’t have to be revised when deploying to a new environment every time?