In Azure devops I want to issue a nuget pack command that passes the option IncludeReferencedProjects
. My repo is in TFVC so I do not believe I can use azure-pipelines.yml. I believe I must do this through the visual designer. I don't see an option to pass additional arguments to the nuget with the pack command type. This makes me think I have to use the custom command type for nuget. When I'm using the custom command type, I can specify -IncludeReferencedProjects but I do not seem to be able to specify **\*.csproj as the items to pack. If I do this the command fails with:
[command]C:\hostedtoolcache\windows\NuGet\4.1.0\x64\nuget.exe pack **\*.csproj -IncludeReferencedProjects -Symbols -Verbosity Detailed -NonInteractive
System.IO.IOException: The filename, directory name, or volume label syntax is incorrect.
How can I pack all csproj output with the IncludeReferencedProjects
flag using the visual designer? Here's a picture of what I have in designer:
How can I pack all csproj output with the IncludeReferencedProjects flag using the visual designer?
I am afraid you could not pack all csproj output with the IncludeReferencedProjects flag.
That because pack command (NuGet CLI) does not support wildcard.
When you use nuget pack command line with wildcard, you will always get the error Unknown command: '**\*.csproj'
. (This error also exists locally.)
To resolve this issue, we could add multiple nuget pack tasks to pack those projects.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With