Getting Expression Activity Type VisualBasicValue1 Requires Compilation In Order To Run

Error " Expression Activity type 'VisualBasicValue`1' requires compilation in order to run. Please ensure that the workflow has been compiled."

Issue Description: In Windows or Cross-Platform projects utilizing Legacy-VB, the compiler may encounter difficulties when processing certain double quotation characters, especially those outside the standard ASCII representation, such as " (0x201C). When such characters are used as string delimiters, the compiler fails to interpret them correctly, leading to a runtime error.


Error Message: "Expression Activity type 'VisualBasicValue`1' requires compilation in order to run. Please ensure that the workflow has been compiled."

1.png


Root Cause: The static validator in Windows Legacy-VB projects does not always warn about the usage of incompatible double quotation characters. This lack of warning could result in developers unknowingly using unsupported characters as string delimiters. As a result, the code may pass the static validation stage but encounter runtime issues later.


Resolution: Follow the below approaches

Approach #1: Replace Unsupported Quotation Characters

In the Windows Legacy-VB project, any double quotation character can be used as the start or end character of a string literal. However, in Windows and Cross-Platform projects, the compiler doesn’t handle double quotes except " (0x22) properly and it causes runtime error as the following message. For example " (0x201C) causes this error. The static validator doesn’t warn this and the compiler doesn’t throw any error.

Scan through the codebase (Studio project) and identify any non-standard double quotation characters used as string delimiters. Replace or retype these characters with the standard ASCII double quotation character " (0x22), save the project and retest it. If there are no issues, publish a new version of the project to Orchestrator.

Approach #2: Manually Recreate Impacted Activities

In cases where the impacted activity, workflow, or sequence becomes broken due to the incompatible double quotation characters, it is advisable to delete the affected element and recreate/configure it manually from scratch. Avoid copying and pasting, as this may retain the problematic characters.