Trying to compile project gives compiler error

Compiling my project to the new .net 5 version (Windows) gives a compiler error.
Putting it back to legacy and the compiler doesn’t complain.

I’m using a dynamic InvokeWorkflowFile.

The legacy project runs fine, new .net 5 compilation fails.

Welcome to the UiPath Community @kwspaargaren

Yes I think the code is developed originally in the legacy windows .net 4.6 framework.

This is correct and will be like that only.

Legacy windows process will not be completely compatible on newer windows .net5 framework

You can mention more details if the issue is something more than this.

Below link explains the way UiPath handles the framework change in windows.

Automation Project - Framework

This post explains that difference nicely

UiPath 2021.10 Updates

VB type project gives better exception:

Unexpected error has occurred during the library compilation process:
Workflow file ‘…\DynamicInvoke\Main.xaml’ contains an InvokeWorkflowFile activity with an dynamic expression ‘[filePath]’. Expressions are currently not supported.

Found it:

Known issues:

The Invoke Workflow activity doesn’t support variables/arguments as workflow file names in Modern .NET 5 Windows projects. This will trigger an “Expressions are currently not supported” error notification.

When will this get solved ??

1 Like

Release Notes (uipath.com)

Hi @kwspaargaren ,

Thanks for sharing this known issue. Looping our forum manager @loginerror look into this issue.

Because the .net processes are compiled you cannot have an expression in invocation. What is your usecase? What do you try to accomplish?

I’m trying to get depending on an input parameter to invoke a specific file depending on the parameter. So for each situation I’m using a different file with specific logic.

The only option is to do an if or an else if and invoke the proper workflow.

like:
if ( condition a)
invoke _ wf _ a
else
invoke _ wf _ b

Yes I came from dynamic code to static code, so that’s solved now Thanks.

Next problem is recursion, its not supported I guess:

02/14/2022 21:09:16 Unexpected error has occurred during the library compilation process:
The following workflows are in a least one invocation cycle:

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