question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot specify multiple .csproj paths in dotnet pack task

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
thesattirajucommented, Oct 4, 2017

@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.

2reactions
aldomscommented, Oct 2, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DotNetCoreCLI@2 - .NET Core v2 task - Microsoft Learn
Build, test, package, or publish a dotnet application, or run a custom ... DotNetCoreCLI@2 - . ... Path to csproj or nuspec file(s)...
Read more >
Nuget Pack multiple projects into single Nuget package with ...
Ex: I have two .csproj, one of them having dependency on other external packages such as NewtonSoft. dotnet new classlib -o ClassLibrary1 dotnet...
Read more >
Wrong Suggestion in "dotnet pack" Build Task, at the Field
The Info suggestion has the old format to exclude Unit-Test projects from the dotnet pack build task: -:**\*.Tests.csproj. Correct format would be:.
Read more >
Shipping a cross-platform MSBuild task in a NuGet package
In step 2, we used dotnet msbuild and the netstandard1.6 task assembly. ... set this property, so you can't count on “Full” to...
Read more >
Set NuGet metadata via MSBuild - Kaylumah
$ dotnet pack Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found