I have a number of web apps in a suite. I use Web Deploy to publish the deployment packages that I build with Visual Studio. With these packages comes a SetParameters.xml file that can be used to modify values in the web.config. Several values are done automatically, such as connection strings, but one can add a parameters.xml file to a project in order to specify values that should be parameterizable:
<?xml version="1.0" encoding="utf-8" ?>
<parameters>
<parameter name="Sharepoint service principal name"
description="The principal name of the Sharepoint service."
defaultValue="host/108.125.111.137">
<parameterEntry kind="XmlFile"
scope="\\Web\.config$"
match="/configuration/system.serviceModel/client/endpoint/identity/servicePrincipalName/@value"/>
</parameter>
</parameters>
My question is: if all of my web apps have an app setting in web.config with the same key and value that I want to modify at deployment, how can I avoid duplicating the particular parameter in every parameters.xml file? Is there a way to put this tag in a single location and have each parameters.xml reference that common location instead?