Extract Document Data Activity in UiPath.DocumentUnderstanding.Activities error: "Activity is missing or could not be loaded"

How can I fix the Document Data activity throwing error "Activity is missing or could not be loaded"?

Issue Description

When using UiPath.DocumentUnderstanding.Activities into a project, the Extract Document Data Activity functions correctly. However, upon importing the workflow into another project that already includes the Extract Document Data Activity, despite resolving all packages, an error occurs stating:

"The activity is missing or could not be loaded"

Steps to Reproduce

  1. Create Project A and install Document Understanding.Activities in the project.
  2. Create a Test Xaml file, then use the Extract Document Data Activity and configure it.
  3. Create another project B, then install the DocumentUnderstanding.Activities in the project.
  4. Import the Test Xaml file into Project B from Project A
  5. Open the Test Xaml in Project B - the error mentioned above should occur.

Resolution

To avoid this, we can:

  1. Import the JitCustomTypesSchema.json and JitCustomTypes.json files within the {Project Folder}\.project files from the working project to the non-working project
  2. Close the non-working project and re-open it with Studio so that it will import those Namespaces.