Closed ivoloshin closed 4 years ago
So, something to add. The script ran again and failed. Then I re-queued it and it succeeded. It would be helpful if anyone knew why it would fail randomly with such an error. Definitely seems related to nuget, but I'm not sure how it's affecting it.
Was it the same agent? Sme version of nuget.exe for both?
Yes, nothing changed with the location or agent. Yesterday it errored until I replaced Cake.ps1 file. I thought that fixed it, but I didn't run a diff on the two cake files. Today it errored only the first time.
@ivoloshin If possible, can you try running this scenario through the Cake extension again? We've updated to 0.3.0 which changes how NuGet gets invoked during the build.
Seems random. I went into the build folder and deleted tools folder. Then queued up TFS build again and it worked. Not sure what's going on.
So, this random error never went away...
Now it errors with the this component:
Error: Failed to install addin 'Cake.WebDeploy'.
My build fails with exactly the same issue.
I'm building using a hosted VSTS agent.
Preparing task execution handler.
Executing the powershell script: d:\a\_tasks\Cake_b88ea9a0-7d6e-11e5-b5de-d57d652482f7\0.2.4\Cake.ps1
Installing Cake...
Installing 'Cake 0.23.0'.
Successfully installed 'Cake 0.23.0'.
Executing build script...
d:\a\1\s\build\tools\Cake\Cake.exe "d:\a\1\s\build\SpatialEye.DevOps.Cake.cake" -target="Deploy" -verbosity="Minimal" --paths_tools="d:\a\1\s\build\tools" --experimental
'NETStandard.Library' already has a dependency defined for 'Microsoft.NETCore.Platforms'.
NuGet exited with 1
An error occured while installing package Cake.FileHelpers.
Error: Failed to install addin 'Cake.FileHelpers'.
System.Exception: Unexpected exit code 1 returned from tool Cake.exe
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.InvokeToolCmdlet.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
PowerShell script completed with 1 errors.
UPDATE: the build continuously fails - it is not random.
UPDATE2: i was able to fix the issue by checking in a more recent version of nuget.exe and use that one from my cake script.
@ivoloshin @mapspiral we haven't heard anything on this issue for a while, so I am going to go ahead and close this out. If you are still seeing an issue, feel free to reply on this issue, and we can investigate further.
What You Are Seeing?
On our build server everything worked fine until recently, when I started to get the following error:
What version of Cake are you using?
VSTFS Plugin Cake 0.2.4 Cake 0.17.0
Are you running on a 32 or 64 bit system?
64bit
What environment are you running on? Hosted? Custom?
Windows Server 2012 TFS Build Client
How Did You Get This To Happen? (Steps to Reproduce)
When I run the script from TFS, the install of addin fails. Then I remote to the machine and try to run in from command line and I get same errors. I then delete the
tools
folder and run it again and it works.So here's what I did. I downloaded a latest version of the
Cake.ps1
and overwrote the one hereC:\agent\tasks\Cake\0.2.4
and that fixed it.