简体   繁体   中英

Webconfig transformation files

We start to use Web Config transformation files but we figured out that only works when publishes your application on each environment, we thought the transformation files are to change the connection strings and webservice endpoints when starts to debug your app, currently we have to change the connection string and webservice endpoints manually. We are right or there is a way to take advantage of transformation files to change connection strings and web service endpoints automatically according selected configuration file?


Until now we know that transformation files just works for publish your app on each environment, but I'd like to know if there is a way to take advantage of transformation files as developer, for example: Imagine that testing team detects a bug, now developers have to replicate the error in development environment, then they have to change the connection string and web services endpoints manually to point to testing environment and replicate the error too. As developer I'd like to avoid change connection string and endpoints webservices manually. I thought just switching between transformation files I could achieve it but no, because If we select Debug and run the application, it points to the development environment, then if we select Testing and run the application, it still pointing to the Development environment.

How can we achieve to point to the correct environment or is there another way to do it?

Use the settings you want for your debugging in the web.config. If you want to use release settings, publish and use web config transforms

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM