I looked around a bit and it looks like
Long-running activities part of the
UiPath.Persistence.Activities
package can only be used in an Orchestration Process entry point, the file marked asMain.xaml
.
See here, the Best Practices part:
https://docs.uipath.com/studio/v2019.0.0/docs/orchestration-process#section-best-practices
From what I’ve found out, this is the cause of the error.