[BUG] - Using C# throws an error when set up default value for booleans

Hi there,

I spent lots of time to find out that a project based on C# will crash when it comes to test single activities within the compilation and when there is any Boolean set up as variable or argument which has a default value assigned (e.g. true).

image

Error message would be something like:

Während des Kompilierungsprozesses der Bibliothek ist ein unerwarteter Fehler aufgetreten:
Die Assembly-Kompilierung hat die folgenden Fehler zurückgegeben:

    • (310,90): error CS0103: Der Name “True” ist im aktuellen Kontext nicht vorhanden.*
    • (316,24): error CS0103: Der Name “True” ist im aktuellen Kontext nicht vorhanden.*

(in English it’s the same). For some reasons UiPath converts the default value from “true” to “True” (or “false” to “False”) which leads in the context of C# to an error because it’s case sensitive.

Interesting fact: If i Debug the whole project there is no error coming up - only for testing any specific activity!

I tested with different studio version (also with 2023.10.10) and also with multiple package versions. The bug is still there!

Workaround would be to not assign initially (in the Data manager) any value or to use as default value the function Convert.ToBoolean(“false”)

image

Thanks for reporting this. We have a bigger effort around C# in progress for current release and we will also be looking into this report.

I’m trying to reproduce this on my side but cannot seem to get the error. Could you please provide a project (or just the xaml file) with the minimum steps where the issue is visible, so we can look into it? Thanks!

Do you have a list of issues to share? I prefer C# and have found it really stable for a long time so curious what sort of issues you are addressing, if its bugs then ok, maybe I missed them, if its QOL updates then I really want to know.

I’m afraid we cannot provide a fixed list of improvements, but the main goal is to close the gap between VB and C# (so C# would be 100% usable, with no critical issues).

Dear all,

thank you very much for all these responses. Attached you find a part of the project which includes one argument which is set to “false” so that I am not able to test single activities.

image

sendMailFlow.xaml (28.1 KB)

Hi, @Senseo929,

This has been fixed and will be available with the next community release (probably 24.4)

Best wishes,
Alex

Thank you very much for your feedback!

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