Azure Devops Release Pipeline Json File Transformation Not working

Viewed 239

I'm trying to set up a release pipeline in Azure Devops, and want to replace some settings in the appsettings.json files. I have this pipeline:

enter image description here

If I inspect this zip on my build server, the root of the zip file contains 2 appsettings files, one called appsettings.json and another one appsettings.Production.json. Inside the root of both of them is this key:

"ElasticApm": { "ServerUrl": "blabla" }

I want to replace blabla with something else in both files. My pipeline variable looks like this:

enter image description here

However, when I run the release pipeline, and check the json files on the IIS server, the variable isn't replaced. What is going on?

1 Answers

Found it myself. I just set the file transformation step to target **\appsettings* and it works. Also if you’re targeting something in an array, remember that they start counting at zero…

Related