Azure DevOps variable and multiline value

2.7k views Asked by At

I have an Azure Devops Pipeline Task for .NET Core, specifying the 'test' command. One of the parameters is 'Path to project(s)'. You can specify multiple globbing patterns, each on its own line. Now I want to make this value settable at queueing time by using a variable $(UnitTestPatterns). But a variable cannot have a multiline value. How can I specify 2 or more globbing patterns in a way that all are evaluated?

I have tried a pipe '|', a comma ',' and a semicolon ';' as separators, none have worked. The log of the task then shows ##[warning]Project file(s) matching the specified pattern were not found.

Example multiline value:

**/Project.*.Tests/*.csproj 
!**/Project.Module2.Tests/*.csproj

I want a variable like this (with probably some secret separator, the ';' does not work):

$(UnitTestPatterns) = **/Project.*.Tests/*.csproj; !**/Project.Module2.Tests/*.csproj

I am using the UI to set the variable, not YAML.

1

There are 1 answers

0
Krzysztof Madej On BEST ANSWER

It looks that this is not supported. Please check this topic on Developer Community. You may also check this topic where you will find workaround.