Cannot get returned the value of variables in the immediate panel: Expression Activity type 'CSharpValue`1' requires compilation in order to run. Please ensure that the workflow has been compiled

I started a project in REFramework using C# in legacy mode, then converted to modern since I couldn’t create a modern project directly in C#.

I had no problems so far, apart from the issue I encountered when debugging my project. I cannot seem to visualize the values returned from the immediate panel, regardless of the variable I am entering. I am facing the error:

image

I have tried a few suggestions found online:

  • I have C# as the language selected in the project settings->design, and also in the project.json file.
  • Some suggested it had to do with the version of the UiPath.System.Activities package, which should be 23.10.3 (same as mine, newer versions will crash studio in my case). My studio version is 2022.10.3.

From what I’ve seen, there is no clear answer so far, unless I have missed some information in the posts I have read.

Would really appreciate the help :slight_smile:

Thank you
Lucian

we encountered a few scenarios where immediate panel refused correct syntax.
Can you try what watch panel is returning?

I tried in the watch panel. It returned the actual values of the variables. But when trying to use a method on a variable, or a property, to return the row count of a datatable for example, it returns the same error.

Yes as mentioned:

and sometimes also watch panel reacted the same.

Along with some adjusting of package versions we were not able to get rid off it in all

We would recommend to provide it as feedback via feedback category along with all details that others can replicate

I see,

Thank you for your response.

I will have to convert back to VB until the issue will be fixed :slight_smile:

There are tons of posts on this. It’s usually due to an incorrect quote character. This often happens when you copy/paste from a web page into your code.

we can confirm that correct statements were not accepted in immediate panel but in watch … as also mentioned.

Especially when dumping out a variable we are not in touch with quotes. Same above inspectable in the screenshot and is not in relation with " and inverted ones

What’s the type and scope of the variable and can you please show the value that is showing in the watch panel(Sometime)?

If possible the screenshot of both!

Regards,
Ajay Mishra