The hint text in TFS says:
"Variables defined in the Build or Release Definition will be matched against the 'key' or 'name' entries in the appSettings, applicationSettings, and connectionStrings sections of any config file and parameters.xml. Variable Substitution is run after config transforms.
Note: If same variables are defined in the Release Definition and in the Environment, then the Environment variables will supersede the Release Definition variables."
Could someone please clarify the "and parameters.xml" part? I see nothing here talking about that. Is that help text correct? How is it supposed to work?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thank you for your feedback. I have passed this on to the product team for investigation and I'll let you know their response.
This feedback came from the product team:
Msdeploy.exe by default supports overrides values in web.config with values from parameters.xml. Our task does:
1) Variable substitutions like Variable substitution and XML transformation first and
2) then invokes msdeploy.exe for deployment during which the web.config substitution happens from parameters.xml.
In this, Variable substitution in Step 1 is done on .config, .json and parameters.xml. The task can update values in parameters.xml before it is supplied to msdeploy.exe.
I will update the topic to reflect this. I hope this helps answer your question.
Thank you for the update @alexhomer1
Unfortunately, that doesn't quite clarify things.
That's what the hint text in TFS says, but that's not how it works.
Is there a place where I can look at the source to see what is actually going on?
@alexhomer1 ?
I think it's supposed to mean that msdeploy.exe accepts an input file (parameters.xml) which it then uses to find and replace any occurence in the target file (app.config).
See "4. Improved parameterization" on https://blogs.iis.net/msdeploy/announcing-web-deploy-3-0-release-candidate
@Advanium thank you, but your response confuses matters more
I am aware (and had already read) what you are referring to, but I fail to see the relevance with the specific point I've raised. Would you please care to enlighten me?
Thank you. I will request additional information.
I was struggling to get XML transformations working for IIS Web App Deploy.
As far as I can tell, this line proved to be incorrect:
Set the Copy to Output Directory property for the configuration transform files to Copy If Newer.
Instead I had to set the "Build Action" property for each of the transformation files (Web.
The issue is simply setting it to copy the files to the output directory will place them in the bin directory when they actually need to be one level up with the web.config is deployed (setting them as "Content" will do this).
Thanks @seanoflynn-tie - I had the same struggle, and that fixed it. Documentation is still wrong.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue hasn't been updated in more than 180 days, so we've closed it. If you feel the issue is still relevant and needs fixed, please reopen it and we'll take another look. We appreciate your feedback and apologize for any inconvenience.