Skip to content

[BUG]: FileTransform@2 task fails if "Changes are already present in the package." #20837

@woeterman94

Description

@woeterman94

New issue checklist

Task name

FileTransform@2

Task version

2.249.1

Issue Description

The taks (and build) fails entirely if there is nothing to transform. Version 2.249.1.

Image

Behavior before (version 2.246.1)

Image

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows_NT (10.0.20348)

Relevant log output

Starting: Transform appsettings.json
==============================================================================
Task         : File transform
Description  : Replace tokens with variable values in XML or JSON configuration files
Version      : 2.246.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/file-transform
==============================================================================
Applying JSON variable substitution for **/appsettings.json
Applying JSON variable substitution for H:\_work_agent\3\s\REDACTED\web\appsettings.json
Applying JSON variable substitution for H:\_work_agent\3\s\REDACTED\web\bin\Release\net8.0\appsettings.json
##[error]Failed to apply JSON variable substitution. Changes are already present in the package.
Finishing: Transform appsettings.json

Full task logs with system.debug enabled

No response

Repro steps

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions