Asp.net config conversions - not applicable for regular builds, only publish

We have several configuration transformations that allow publishing in a specific environment with the correct parameters specified in web.config.

However, it would be useful to run the application locally, specifying a specific assembly configuration. This will allow us to run the application locally and connect it to a live database, for example, quite conveniently when tracking errors, for example.

However, when we press F5 to launch the application locally, regardless of the currently selected build configuration, the conversion of the web.config file does not occur.

Is this normal behavior and can it be changed?

+6
source share
1 answer

Posted from comment:

Yes, this is normal behavior. This is unpleasant, because it makes everyone feel semi-work-ish, and I agree that it should be possible to abandon the same transformations that are applied during standard assembly. I have not found any VS extensions that can do this for you yet, although I think it can be done. I personally make a ".Local" version of all my build configurations and publish in local IIS, which I can connect very quickly / easily if I want to use difffferent environment / config web.config. Some duplication is required, but is work being done

Thanks David

+4
source

Source: https://habr.com/ru/post/891820/


All Articles