'Azure DevOps File Transform task not catching issues with transform

We have a few of our Release pipelines that perform the web.config transforms for the environment they are going to using the File Transform task from the DevOps marketplace. We inherited this project from another team, and 99% of the time no issues have come up with this setup. However, last week we performed a release for this project to production and the Production config did not correctly transform and when the update went to production it was configured to connect to our dev environment settings.

Looking at the log of the release, the File Transform task finished green but had a single warning:

2022-04-19T21:38:13.2301719Z ##[warning]Unable to apply transformation for the given package.

Would like to have seen the task fail and given us an alert so that we could have reviewed the issue and rolled back the other bits of the release, which included an API update and Database update, but not sure how to do that. Is there any way to have that warning listed above be considered a failure for the task?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source