Assign: Expression Activity type 'VisualBasicValue`1' requires compilation in order to run

I currently migrated my UiPath workflow from Windows (Legacy) to a new compatibility type: VB, Windows

The previous Assign that stores info into a data table is working
PDFMerge = FilterPortalDocs.defaultview.ToTable(true, “DocFilePath”)

but the next assign task is failing, specifically the the Assign task that uses “AsEnumerable” function:
PDFMerge2 =
PDFMerge.AsEnumerable().Select(Function (a) a.Field(of string)("DocFilePath”).ToString).ToArray()

I’m encountering the error below:
Assign: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.

It was recompiling fine when I hit debug mode. But once it started to run the workflow and reaches this Assign part, it’s getting this error (above)

Not sure if this is relevant but this was working before using Windows (Legacy) compatibility with the package UiPathTeam.PDF.Extensions.Activities

But since I had to move my package to Windows compatibility, I had to switch to UiPath.PDF.Activities package

what is the variable datatype of PDFMerge2 which you have set?


Hi @judyt ,

Could you Update the above Expression to the below :

PDFMerge.AsEnumerable().Select(Function(a) a("DocFilePath").ToString).ToArray()

Let us know if this doesn’t work.

Brilliant! This worked! Thank you!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.