Azure File Transformation Task doesn't work for variable name with hyphen

Azure File Transformation Task | Azure Devops YAML Pipeline

Sanjeevi Subramani's photo
Sanjeevi Subramani
·Oct 20, 2021·

1 min read

Azure File Transformation Task doesn't work for variable name with hyphen

Subscribe to our newsletter and never miss any upcoming articles

Play this article

Read this article on how to implement File Transformation Task implementation:

In some scenarios YAML File transformation task fail to update the variable values inside the json/xml file even though we have variables with same name matches.

One of those scenarios is that when we have hyphen in the variable name matching text then it doesn't work.

This doesn't work.

{
"element-ToBe-Replaced":""
}

Try to change those variables without any special characters then it will work fine.

This will work if you have

elementToBeReplaced

variable in pipeline variables and have following sample json in configuration json.

{
"elementToBeReplaced":""
}
 
Share this

Impressum

Available for mentoring @ Top Mate!