It's not possible using MSBuild, but it's possible using MSDeploy.
MSDeploy won't let you specify the settings directly, but it will let you back up an app pool and apply it to another server (it will modify differences in settings if there are any).
First, you need to backup your settings and commit them to SVN:
msdeploy -verb:sync
-source:appPoolConfig="name of your apppool"
-dest:package="apppool.zip"
During compilation time, you need to sync the output package into the appppol package, since a manifest provider can't include a package/archivedir provider:
msdeploy -verb:sync
-source:ApplicationPackage.zip
-dest:appool.zip
-skip:skipAction:Delete
(The skip prevents the deploy from deleting the appPoolConfig provider from the target package)
NOTE: Don't do this the other way around (apppool.zip into ApplicationPackage.zip) as it will delete all your declared parameters and I'm not sure how to skip that.
It's probably possible to copy apppool.zip "underneath" ApplicationPackage.zip before it's generated (via MsDeploySourceManifest
) so it actually merges in one step, but I'll leave that as an exercise for you until I get the time to test it.
NOTE: You could also use dest:archivedir if you'd rather have files in a directory than a zip