Skip to content

[BUG]: VSTest@3 Predfined variable $(Build.SourceBranch) is not correctly interpreted #21260

@Tkn1967

Description

@Tkn1967

New issue checklist

Task name

VsTest

Task version

3.*

Issue Description

The predefined variable $(Build.SourceBranch) in the Search folder is incorrectly interpreted during the build.

The following Search folder is used:
$(Build.SourceBranch)/UITests/bin/$(BuildConfiguration)

It results in 'Error: Search folder: D:\B\A1\20\s$\Rules\CodeBase\Development\devMain\UITests\bin\release'

Note that the $ is included in the folder which is not correct.

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 Server 2022

Relevant log output

##[error]Error: Search folder: 'D:\B\A1\20\s\$\Rules\CodeBase\Development\devMain\UITests\bin\release' should be a directory and it should exist.

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions