Compilation Failed Or Cancelled

Compilation error thrown while running the process from Studio v 2023.4.x .

Issue Description: When running/debugging the process from Studio, it fails with the following compilation error on Studio version 23.4.x, but it runs fine on Studio version 22.10.x.

"Error: System.InvalidOperationException: In order for projects containing coded workflows to be compiled, the UiPath.CodedWorkflows package must be referenced explicitly if none of the imported packages already depend on it., HResult -2146233079"

Root Cause: The Studio project is checking the cs (C#) files and tries to execute them.

Workaround: Check if any .cs files exist in the project folder. If found any, try the below,

  1. Take a backup copy of the project as a precaution
  2. Rename the .cs files to .txt files
  3. Close Studio and reopen the project.

Next Steps:

If the issue still persists after following the workaround, share the following details:

  1. Replicate the error
  2. Collect the diagnostic tool logs and share these with us
  3. Zip the project and share it.