Run new 3.3 nuget add command

I'd like to run a command for the latest nuget (3.3)

It is the nuget add command

I see that in my build logs where I run nuget pack build steps, it uses the following:

D:\TeamCityBuildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe D:\TeamCityBuildAgent\tools\NuGet.CommandLine.3.3.0.nupkg\tools\NuGet.exe pack my.nuspec <options>

But I don't see any build step configuration that would allow me to run that NuGetRunner.exe or the NuGet.exe from the tools directory without directly referencing that exact path, which seems like it will fail eventually.

Is there a nice/safe/recommended way to use the TeamCity provided NuGet.exe?

1 comment
Comment actions Permalink

Here is what I came up with (because 2.8.6 is my current default NuGet, not 3.3)

%teamcity.tool.NuGet.CommandLine.3.3.0.nupkg%\tools\NuGet.exe add mylib.nupkg -Source \\myserver\nuget -NonInteractive


Please sign in to leave a comment.