Skip to content

ParentContainsErrorRecordException, The process cannot access the file 'C:\Program Files\dotnet\dotnet.exe' because it is being used by another process. #387

@IhateTrains

Description

@IhateTrains

Description:
setup-dotnet action fails with ParentContainsErrorRecordException: https://github.com/ParadoxGameConverters/ImperatorToCK3/actions/runs/4262267753/jobs/7417899979

Task version:
v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Use setup-dotnet to set up up NET 6 and do something with it. In the next steps, use setup-dotnet again to set up .NET 7.
Example:
https://github.com/ParadoxGameConverters/ImperatorToCK3/actions/runs/4262267753/jobs/7417899979

Expected behavior:
The action should set up .NET 7.

Actual behavior:
I'm getting the following exception:

dotnet-install: Failed to extract package. Exception: Exception calling "ExtractToFile" with "3" argument(s): "The process cannot access the file 'C:\Program Files\dotnet\dotnet.exe' because it is being used by another process."
ParentContainsErrorRecordException: D:\a\_actions\actions\setup-dotnet\v3\externals\install-dotnet.ps1:816
Line |
 816 |  …             [System.IO.Compression.ZipFileExtensions]::ExtractToFile( …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "ExtractToFile" with "3" argument(s): "The process cannot access the file 'C:\Program
     | Files\dotnet\dotnet.exe' because it is being used by another process."

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions