I setup a step in my TFS 2017 build to Push a nuget package to my Octo server. I’m having an issue with it failing on a “process cannot access file” error. See error below.
******************************************************************************
Starting: Push Tabs.Dispatch Package to Octopus
******************************************************************************
==============================================================================
Task : Push Package(s) to Octopus
Description : Push your NuGet or Zip package to your Octopus Deploy Server
Version : 3.0.166
Author : Octopus Deploy
Help : Version: 3.0.166. [More Information](http://docs.octopusdeploy.com/display/OD/Use+the+Team+Foundation+Build+Custom+Task)
==============================================================================
5ef25d66-e619-412a-9307-cf10aea6edcb exists true
Checking local tool cache
Downloading: https://download.octopusdeploy.com/octopus-tools/4.38.1/OctopusTools.4.38.1.portable.zip
Extracting archive
C:\Windows\system32\chcp.com 65001
Active code page: 65001
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\w\IA\_temp\dbf98a25-1d1a-4fcd-a6b4-a1ffc1dfd046', 'C:\w\IA\_temp\44616330-49c9-4e58-b73c-06f648bd1036')"
Exception calling "ExtractToDirectory" with "2" argument(s): "The process cannot access the file
'C:\w\IA\_temp\44616330-49c9-4e58-b73c-06f648bd1036\Autofac.dll' because it is being used by another process."
At line:1 char:111
+ ... catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\w ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : IOException
Error: Failed to download octo tools 4.38.1. Error: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe failed with return code: 1
Failed to push package. Failed to download octo tools 4.38.1. Error: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe failed with return code: 1
******************************************************************************
Finishing: Push Tabs.Dispatch Package to Octopus
******************************************************************************
Any ideas on why this is happening? I have this step in another build and it works fine.