Does anybody know how to get the web.config transformation to replace a custom configuration section. I have set msbuild to verbose mode and the transformation simply ignores the existence of the custom section with a replace transform.
Web.Config transformation of custom config section
Asked Answered
Can you paste the snippet showing your custom config section here???? –
Hourihan
@Sayed Ibrahim Hashimi - I think the issue was an incorrect configuration switch being passed by TeamCity due to it caching environment variables. Thanks for you interest:) –
Goodrum
A web.config transformation does not care about custom configuration sections. It will do replacements on the whole web.config file.
Here is an example XML of a web.config replacement I used to set our memcached server ips:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<enyim.com>
<memcached>
<servers xdt:Transform="Replace">
<add address="192.168.130.1" port="11211" />
<add address="192.168.130.2" port="11211" />
<add address="192.168.130.3" port="11211" />
</servers>
</memcached>
</enyim.com>
</configuration>
yeah it must have been a teamcity issue passing an incorrect configuration, thanks –
Goodrum
In case you have the same issue I was having... I wanted to kick myself!
During Publish, make sure you select the environment :)
© 2022 - 2024 — McMap. All rights reserved.