1

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.

GreatBittern
  • 218
  • 1
  • 12
  • @GreatBittern Not get your latest information, is the answer helpful for you? Or if you have any concern, feel free to share it here. – Hugh Lin Oct 28 '20 at 03:22

1 Answers1

2

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.

Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107