I have created a TeamCity buils step using Nuget Installer, but when I run the steps I get the error :
Updating sources: server side checkout
[15:35:44][Updating sources] Repository sources transferred: 112.73 KB total
[15:35:44][Updating sources] Removing C:\TeamCity\buildAgent\work\12dee9c66185ea67
[15:35:44][Updating sources] Updating C:\TeamCity\buildAgent\work\12dee9c66185ea67
[15:35:44]Parameter **"teamcity.tool.NuGet.CommandLine.DEFAULT=%teamcity.tool.NuGet.CommandLine.3.4.3%" is not fully resolved, using as is.**
Step 1/3: Nuget (NuGet Installer)
[15:25:34][Step 1/3] scan: Searching for nuget.config files
[15:25:34][scan] Found packages folder: C:\TeamCity\buildAgent\work\12dee9c66185ea67\packages
[15:25:34][scan] Failed to find repositories.config at C:\TeamCity\buildAgent\work\12dee9c66185ea67\packages\repositories.config
[15:25:34][scan] Scanning projects in solution file: C:\TeamCity\buildAgent\work\12dee9c66185ea67\Specflow.sln
[15:25:34][scan] Found project C:\TeamCity\buildAgent\work\12dee9c66185ea67\Specflow\Specflow.csproj
**[15:25:34][Step 1/3] Failed to find NuGet executable at: C:\TeamCity\buildAgent\work\12dee9c66185ea67\%teamcity.tool.NuGet.CommandLine.DEFAULT%
[15:25:34][Step 1/3] Step Nuget (NuGet Installer) failed with unexpected error**
But I have downloaded the Nuget.exe below are the screenshots:
Not sure what am I missing? Any help is much appreciated! Thank you.
So after breaking my head over this, I managed to find the solution.
At the time of downloading nuget.exe in Teamcity - Administrator>Integration>Tools>Nuget.exe>Installed Version>3.4.3
if teamcity agent is already running & you try to run a new build, the agent can never detect new installations(in this case nuget.exe) and so it fails.
Solution - restart the agent ->in command prompt C:\TeamCity\buildAgent\bin>agent.bat stop force and then C:\TeamCity\buildAgent\bin>agent.bat start.
Now go to Administration>>Project_name>Build Steps>Parameters
Run the Build
The Nuget Installer Step runs fine and restores the packages.
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