Publishing Error "The Process Cannot Access The File Filename Because It Is Being Used By Another Process"

Error thrown while trying to publish a package "The process cannot access the file filename because it is being used by another process" .

Root Cause

It is not possible to use a file that is currently being used by another process.

Resolution

Close the program has that file open first, before using it.

If the program that is already run is not known, learn by using Handle or Process Explorer.


To solve the issue, try the below approaches :

1. Closing From task manager.

  • Open Task Manager
  • Navigate to the Processes tab, select the UiPath Assistant [Agent] and end the process.
  • Close all the UiPath Assistant [Agent] instances and Restart the Robot services.
2. Checking antivirus/firewall.
  • Check if the antivirus is checking the file and locking it.
  • Try to whitelist the project location as well as the temp location where the project is temporarily packaged.