Task: .NET Core (Preview)
Version: 2.* (preview)
Command: pack
Using multiple values in Path to csproj or nuspec file(s) to pack, delimited by ; fails with ##[error]No files matched the search pattern.
This value works:
src\Empactis.Data.Querying\Empactis.Data.Querying.csproj
This doesn't:
src\Empactis.Data.Querying\Empactis.Data.Querying.csproj;src\Empactis.Data.Querying.ElasticLinq\Empactis.Data.Querying.ElasticLinq.csproj
I have tried many variations including usage of wildcards and negative patterns as specified in the help text:
Pattern to search for csproj or nuspec files to pack.
You can separate multiple patterns with a semicolon, and you can make a pattern negative by prefixing it with '-:'. Example: *.csproj;-:*.Tests.csproj
The same field with the same values in the "NuGet pack" task type works fine.
Same thing here, had to use separate task for each project
If the NuGet.UseLegacyFindFiles variable is not defined as true, then the VSTS Task Lib is used to resolve the files from the pattern, which does not appear to support semicolons. If the variable is true, the NuGet resolveFilterSpec is used, which does support semicolon-delimited paths.
Unfortunately I don't know if the label should be changed (i.e. semicolon-delimited specs should be deprecated) or if the task lib should support semicolons. @ds-ms, looks like you might know more about this area than I do.
You could workaround this by defining the NuGet.UseLegacyFindFiles variable to true in your build or release definition.
@pjquirk Thanks for the update on this. I would suggest that at the very minimum the label should be changed to explain the differences.
Thanks for reporting this issue, the dotnet task should support semicolons as separators just like the NuGet task does. We have identified the bug and are working on a fix.
@tjrobinson, we have deployed the hotfix to all rings, please try again and let us know if the issue still persists.
@pjquirk You're right, the new library we use doesn't support semicolons for as delimiters. A new line is the delimiter the new library expects.
@tjrobinson the pattern you should have given is
*.csproj
!*.Tests.csproj
Will make sure to update the help text accordingly; Thanks for reporting this.
@ds-ms @aldoms I'm a bit confused, one of you appears to be saying that semi-colons are now supported but the other is saying that I should be using a different pattern. Which would be the best to use going forward?
@tjrobinson: @aldoms has made the fix to support semicolons I suppose. I was talking about the earlier functionality.
Multiple projects with semicolons works for me now.
Will it change to a new pattern in the future?
Glad to hear it's working for you, I'll close the issue for now. We don't have any plans of the patterns changing in the near future.
Most helpful comment
Thanks for reporting this issue, the dotnet task should support semicolons as separators just like the NuGet task does. We have identified the bug and are working on a fix.