Error code 1

Hi,
Are there any known issues with UiPath studio and using microsoft’s one drive?

My student has no end of issues … the latest

Unable to compile project: Error code 1

that’s it, all it said. No more detail in the log files. Any ideas?
Is this related to the other issue he has:

To workaround these 2 issues, we copy the project, delete all the generated directories, basically everything except .project and screenshots, and then restart studio and load the project. Seems to run just fine then.

Hi @Nick_Scott

It looks like the two issues could be related to the local project/generated files rather than OneDrive itself.

The Error code 1 during compilation is quite generic, so I’d first check whether the project is being stored/synced directly in OneDrive. OneDrive can sometimes cause file-locking or synchronization issues with generated DLLs and project folders.

For the second issue, the FileLoadException for Working with Files_Expressions_Main.dll also points toward a generated assembly being locked, corrupted, or not refreshed correctly.

Your workaround of closing Studio, removing the generated folders/files, and reopening the project is a good diagnostic step. I’d also try:

  • Keep the project in a local folder outside OneDrive and test.
  • Check OneDrive sync status and make sure files aren’t being locked or marked online-only.
  • Update Studio to the latest available patch.
  • Check Windows/OneDrive antivirus or security software for file-locking.
  • If the issue continues locally, collect the Studio logs and project diagnostics and raise a UiPath Support ticket.

If the same project works consistently outside OneDrive, that would be a strong indication that the sync/location is contributing to the issue.

Hi @Nick_Scott,

This could be due to the UiPath project being stored in a synced folder. Files may be temporarily locked, out of sync, or unavailable while Studio is compiling. It is likely a temporary synchronization or cache-related issue.

Thanks!

Hi @Nick_Scott ,
Since deleting the generated folders makes the project work again, I would suggest:

  • Keep the active UiPath project in a local folder such as Documents\UiPath.
  • Avoid developing directly inside a OneDrive-synced folder, then copy/backup the project to OneDrive when needed.
  • When the compile error occurs, close Studio and clear only the generated/cache files before reopening the project.
  • For collaboration/version control, prefer Git/source control rather than using OneDrive to synchronize the live project folder.

Thanks

Hi @Nick_Scott ,

try to google, easy to find why:

Thank you

thanks for your response, but we specifically aren’t using cloud sync’d platform like one drive, as explained above.

Next step is to check to see if studio itself is installed on onedrive, will check that next lesson :slight_smile:

We hit a very similar wall with Studio projects living inside a synced OneDrive folder — compilation seemed to race OneDrive re-downloading files that had been quietly marked online-only. What finally fixed it for us was pausing OneDrive sync completely while developing, not just checking the sync status, since a folder can look fully synced while individual project files are still stubbed. Also worth checking whether the .local and .objects folders are excluded from sync, because those get rewritten on every run and that is where our “could not load file” errors kept coming from. If it still happens with sync paused, the diagnostics log under the UiPath logs folder usually names the exact assembly that failed to compile.

Hi, @Nick_Scott

I also save my project in OneDrive and run it from multiple different PCs, and I experienced exactly the same issue.

I believe the cause of Error Code 1 is as follows:

When a project stored in OneDrive is executed, OneDrive first downloads the project to the local machine before running it. However, the project contains multiple subfolders and numerous files within those folders. It appears that the OneDrive application is not always able to completely download and synchronize all of these files locally. In my case, several files inside the subfolders had not been fully synchronized. This is likely what caused Error Code 1.

Unfortunately, the only solution I found was to copy the OneDrive project to a local folder on the affected PC and run the project from the local drive instead.

If this resolves your issue, please mark this post as the Solution.

Hi @Nick_Scott, since OneDrive is ruled out, this looks like the generated assembly in .local\install is locked or only half-written between runs. Antivirus is the usual culprit, so exclude the project folder. Close Studio fully, delete .local, and reopen the project. As a test, copy it to a simple path like C:\UiPath\WorkingWithFiles, since the spaces in “Working with Files” end up in the generated DLL name. If it still fails, the lines around the compile error in %LocalAppData%\UiPath\Logs usually name the locked file.