Migrated Small workflow from legacy to Windows - I regret this so much

Error {“message”:“Assign: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.”

This is for an assign function with a very standard DateTime use…
DateTime.Parse(today.Month.ToString +“/” + Today.Day.ToString + “/” + today.Year.ToString).ToString(“MM/dd/yyyy”)

Of course it is compiled as that is what Studio does:
System.NotSupportedException: Expression Activity type 'VisualBasicValue1' requires compilation in order to run. Please ensure that the workflow has been compiled. at System.Activities.Expressions.CompiledExpressionInvoker.InvokeExpression(ActivityContext activityContext) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context) at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity)
at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor) at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath) at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)
at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

  • The DateTime variable was not accepting the today value.
    This was listed as a bug fix (ed) in release 2022.10.3 Studio - I have that version but this still seems to be there after conversion to Windows…??

@loginerror I hope UiPath is reconsidering forcing everyone down the “Windows” path and getting rid of “Windows - Legacy” - so many reported issues, you guys need to get it working right before you force everyone into it.

its embarrassing on so many levels…

maybe following helps:

About the shown statement:
As string will be constructed to get it parsed into a datetime which is later returned as a string in
(“MM/dd/yyyy”) format.

DateTime.Now.ToString("MM/dd/yyyy") will do the same

Thanks - appreciate the fast response - sure - there are many ways to do this - but I do not want to believe that a simple string data time manipulation is throwing errors after migration to Windows. It does not really add up.

These are reusable components and were constructed this way for a reason that is beyond the scope of this issue.

Like others have said - I do not believe that going through this exercise for larger companies makes any sense. The number of hours spend trying to understand why something fails mitigates any benefits that might be obtained from this. Moreover this was a very small workflow - and has taken a couple of hours to work through activities that were not compatible, searching for a replacement was not successful either.

I think your migration approach does need another 6 months of solid testing and refinement.

Anyway - I hope UIPath is working on improving this experience -

Lets focus here to get it run again e.g. tool supported replacement of x to " or manually retyping. So in your case, feel free to give us feedback if it was solving the issue.

direct feedback to UiPath can also be posted here

Thanks - marked as solution and UIPath feedback being processed by team

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