Why does this web.config transform say it can't find the applicationSettings element?

sam picture sam · Jul 27, 2011 · Viewed 13.2k times · Source

I get the following error while transforming a web.config file in TeamCity. It happens on the element, <applicationSettings xdt:Transform="Replace">.

No element in the source document matches '/configuration/applicationSettings'

The source file has this setting. Any idea how to solve this?

Answer

sam picture sam · Jul 27, 2011

I had to remove the namespace attribute from the configuration node. There is some conflict in the declared schema and the elements I was using.

xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"