.NET Core SDK/runtime Installer - The process cannot access the file because it is being used by another process
See original GitHub issueRequired Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: .NET Core SDK/runtime installer
Environment
Server: Azure Pipelines, Account Name: DLLGroup, Project Name: DLLGroup, Build Def: API-DUPS-Web-Api-Branches-and-topics
- Agent - Hosted or Private: Hosted VS2017
Issue Description
We get sporadic build failure related to this task with the following error: `Exception calling “ExtractToDirectory” with “2” argument(s): “The process cannot access the file ‘D:\a_temp\a898b499-2079-446a-952e-26b06054db5c’ because it is being used by another process.” At line:1 char:111
- … catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a …
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (😃 [], ParentContainsErrorRecordException
- FullyQualifiedErrorId : IOException
##[error]C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe failed with return code: 1 `
Similar to issue reported within Issue 7692 albeit the issue reported in link is for On-Premise Agent.
Task logs
`Starting: Use .NET Core sdk 2.1.500
Task : .NET Core SDK/runtime installer Description : Acquire a specific version of the .NET Core SDK from the internet or local cache and add it to the PATH Version : 0.2.7 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer
Tool to install: .NET Core sdk version 2.1.500. C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command “& ‘D:\a_tasks\DotNetCoreInstaller_b0ce7256-7898-45d3-9cb5-176b752bfea6\0.2.7\externals\get-os-platform.ps1’” Primary:win-x64 Detected platform (Primary): win-x64 Checking if a cached copy exists for this version… The cache does not contain the requested version of .NET Core. Downloading and installing it now. Getting URL to download .NET Core sdk version: 2.1.500. (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr (node:4472) Warning: Use Cipheriv for counter mode of aes-256-ctr Downloading: https://download.visualstudio.microsoft.com/download/pr/2a508a9d-91e8-4126-904c-f7a515f8a33b/24ff5fe2610ce1ce76370ed053b14094/dotnet-sdk-2.1.500-win-x64.zip Extracting downloaded package D:\a_temp\a898b499-2079-446a-952e-26b06054db5c. 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(‘D:\a_temp\a898b499-2079-446a-952e-26b06054db5c’, ‘D:\a_temp\5c123c0e-45d4-462a-9a52-e686608cefae’)” Exception calling “ExtractToDirectory” with “2” argument(s): “The process cannot access the file ‘D:\a_temp\a898b499-2079-446a-952e-26b06054db5c’ because it is being used by another process.” At line:1 char:111
- … catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a …
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (😃 [], ParentContainsErrorRecordException
- FullyQualifiedErrorId : IOException
##[error]C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe failed with return code: 1
Finishing: Use .NET Core sdk 2.1.500
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
There is a drastic difference in the design of ver 0 and ver 2 of the task. Let’s wait for a week and reply to us if you face this issue again.
Hi @frankkilcommins we are closing this, feel free to re-open if the issue is not resolved.