Install-SPApplicationContent does not parse XML comment in webconfig xml

If you use custom webconfig files under 14/CONFIG folder to modify web application’s web.config file, then pay attention not to include any XML comment <!– –> in the xml files. Neither Install-SPApplicationContent nor STSADM –o copyappbincontent parse xml comments.   For example: in 14/CONFIG/webconfig.custom.xml,   1: <?xml version="1.0" encoding="utf-8"?> 2: <actions> 3: <remove path="configuration/appSettings/add[@key=’Security.ServiceAccount’]" /> 4: …

1