Console
Console copied to clipboard
Package installation fails trying to delete PowerShell.zip
You may encounter an issue when installing with the following message:
Background process failed: Failed to delete the file 'D:\Sites\scms\sitecore\shell\Themes\Standard\PowerShell.zip'

As seen in the log file:
ManagedPoolThread #6 10:39:31 ERROR Installation failed: System.Exception: Background process failed: Failed to delete the file 'D:\Sites\scms\sitecore\shell\Themes\Standard\PowerShell.zip' ---> System.Exception: Failed to delete the file 'D:\Sites\scms\sitecore\shell\Themes\Standard\PowerShell.zip' ---> System.IO.IOException: The process cannot access the file 'D:\Sites\scms\sitecore\shell\Themes\Standard\PowerShell.zip' because it is being used by another process.
This issue appears to prevent any file in the folder from getting deleted.
The IIS Worker process has locked the folder "$($AppPath)\sitecore\shell\Themes\Standard\"
The easiest fix is to stop the w3wp.exe for that given Sitecore instance and then manually delete the zip.
Another easy fix is to simply skip the item during package installation when the confirmation dialog appears.