KB PS Deployment DLL Cannot Access File - rpapub/WatchfulAnvil GitHub Wiki

Problem: File Locked During DLL Deployment to UiPath Studio

Symptoms

  • Cannot copy DLL to C:\Program Files\UiPath\Studio\Rules\net8.0\
  • Error: The process cannot access the file... because it is being used by another process

This screenshot shows the error 'The process cannot access the file... because it is being used by another process'

Root Cause

UiPath Studio or a related background process is locking the analyzer DLL, preventing overwrites during deployment.

Solution

✅ Recommended Fix

  1. Close UiPath Studio: Ensure Studio is fully closed before copying.
  2. Kill Remaining Processes: Run Stop-Process -Name UiPath.Studio -Force in PowerShell if needed.
  3. Copy Again: Retry the Copy-Item or cp command.

🔄 Alternative Workarounds

  • Use a Script: Automate stopping Studio, copying, and restarting it.
  • Deploy to Another Folder: Copy to a temp folder, then move manually after restarting Studio.

References