Azure-pipelines-tasks: NuGet pack Missing NuGet Arguments Parameter

Created on 30 Jun 2017  路  7Comments  路  Source: microsoft/azure-pipelines-tasks

When selecting the "pack" option for the NuGet task there is no option to set additional "NuGet Arguments" like there is with the NuGet Packager task which is now listed as deprecated.

Most helpful comment

Thanks @kyleherzog and @markr007 for the feedback. These seem like reasonable feature requests and I've added them to the NuGet task v3 workitem on our backlog. In light of that, I'm going to close the GitHub issue.

All 7 comments

This is by design, to avoid conflicts between custom-entered arguments and the task's built-in settings. The "custom" option in the Command dropdown accepts a custom command and arguments of your choice.

@alexmullans I think this may need rethinking. Nuget pack gives me lots of options to make packing nice and easy (as the old Packager task did). However, I use the NuGet arguments to specify a suffix for pre-release builds with the buildid which ensures a unique version and allows us to test them properly in other projects before the new packages are fully released. With the new tool I can't see any way to do this other than creating the entire command line using custom (which sort of negates the point of the task at all). The old task successfully dealt with things, can this new one not do the same? Thanks.

Opening for re-evaluation since old tasks supported? @alexmullans to make the call

@markr007 thanks for the feedback, and sorry that we missed support for this scenario.

We made a conscious decision to remove the NuGet Arguments field because it produced a set of arcane and hard-to-debug issues when the arguments provided in that field conflicted with the arguments provided by the rest of the task UX.

However, I'm open to extending the task with additional options if we missed some common ones. Which NuGet arguments would you expect to provide? Are you just overriding -Version or are there more?

When I originally opened this, I was trying to get at the -Version parameter. I too was trying to generate my own version number based on a combination of other environment variables but also included a suffix for pre-release builds. I ended up using the "Use an environment variable" setting of the pack options. This required me to add a custom task prior to the Nuget task that actually sets my desired version into one environment variable of what the version number should be. It would be nicer if there was an option to customize the version directly in the Nuget task.

Thanks @alexmullans -Suffix is the main one I use as I set the version number via a custom task that creates a nuspec file from assembly properties but I could certainly see -Version being useful as well.

Thanks @kyleherzog and @markr007 for the feedback. These seem like reasonable feature requests and I've added them to the NuGet task v3 workitem on our backlog. In light of that, I'm going to close the GitHub issue.

Was this page helpful?
0 / 5 - 0 ratings