Reputation: 970
In my release pipeline I am using File Transform option for my web.config. I have web.config and web.staging.config File transform is working and changes are applied in web.config but why web.staging.config is still present in the final deployed package.
Am I missing any configuration or this a normal behaviour?
Upvotes: 0
Views: 740
Reputation: 19461
For this issue , with XML file transformation, the web.xxx.config file is required. The transform will be applied when publish web app to web deploy package or publish to server directly per to the configuration.
As stated in the documentation: You need to create a Web Application package with the necessary configuration and transform files.
So if you want to removing all config transforms, as a workaround , you could add a Delete-files task in the end to remove all configuration files. For example:
Source Folder:
$(wwwRoot)\
Contents:
**\*.staging.config
Here is a case with similar issue , you can refer to it for details.
Upvotes: 2