Web.Config Transformation Is Still a Thing
Visual Studio has an old but still helpful way to change your web.config file based on the environment or build mode. This allows you to replace connection strings or the configuration for web services without the need to fiddle with XML. You still need to write XML Transformation code, but that is a lot simpler than modifying everything on your own.

