Error(s) when publishing project, {project name}.dll cannot be accessed

I’m having a weird error when trying to publish my project. It has been working fine for a couple months, but suddenly started having this problem recently. When I try to publish the project, I get the error:

The process cannot access the file ‘C:\Users{user}\Documents\UiPath{projectname}{projectname}.dll’ because it is being used by another process.

This .dll file does not exist at all, but I’m not sure that it is supposed to. Most of our other projects publish just fine still, and none of them have a {projectname}.dll file in that location. I was able to track this error back to the GetProcesses node in one of my workflows. When GetProcesses is enabled, I get the error:

But if I disable/comment it it publishes. However, the published file has a similar error when installing from assistant:

Access to the path ‘C:\Users{user}.nuget\packages{projectname}{projectversion}\lib\net8.0-windows7.0{projectname}.dll’ is denied.

Here are the dependencies in the project:

  • UiPath.Excel.Activities = 2.24.3
  • UiPath.Mail.Activities = 1.23.11
  • UiPath.System.Activities = 24.10.6
  • UiPath.Testing.Activities = 24.10.3
  • UiPath.UIAutomation.Activities = 24.10.6

I have updated them all and selected “Lowest Applicable Version” as recommended in this post. I also tried running UiPath as Administrator, but for some reason that sign’s me out of studio and won’t let me log back in unless I’m not running as admin (I don’t know if this is a UiPath feature or something our IT team caused). Here is a full list of everything we’ve tried to fix it:

  • Closing all background tasks including UiPath Executor and Assistant.
  • Updating dependencies
  • Removing unused dependencies, workflows, variables, etc.
  • Restarting the computer (this problem has persisted over the weekend)
  • Running UiPath as admin (see above)
  • Creating a new project and copying over the workflows
  • Creating a new project and copying all but this broken workflow and recreating it manually
  • Uninstalling and reinstalling UiPath
  • Copying the project to another PC and publishing from there
  • Creating an empty .dll file in the specified location

As I said, other projects build and publish fine from this PC, so I’m not sure what the problem could be. Any help would be greatly appreciated!

Hi @MARVlN,

Please follow the steps mentioned in below post:

Regards
Sonali

Thanks for your response! I attempted to follow these steps, but since the .dll file doesn’t exist at all it could not be found. After talking with IT yesterday, it sounds like the problem might have been caused by our antivirus preventing the .dll from being created, combined with the fact that the project was renamed. I think somehow renaming the project caused the antivirus to block the .dll that would otherwise have been considered safe in a newly created project. We still don’t have it working yet, but at least the problem is no longer a mystery.

1 Like

Hi @MARVlN,

Makes sense.

How about you create a new project and simply copy your xaml files from this old project to new one via file explorer.

That should help you see if new project after copying xaml files from old one works as expected.

This would further narrow down the cause.

Regards
Sonali