UiPath Studio Version: 2023.10.4
Project: REFramework, Performer project.
We recently migrated our project from Legacy to Windows. After fixing all the errors and rebuilding some workflows, we finally got to a point where we tried to publish the new project.
That resulted in this error:
Unexpected error has occurred during the library compilation process:
The assembly compilation returned the following errors:
* (1,11919): error CS0718: 'File': static types cannot be used as type arguments
* warning CS1701: Assuming assembly reference 'System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=a03g5k7f11m50r3a' used by 'UiPath.Database.Activities' matches identity 'System.Data.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=a03g5k7f11m50r3a' of 'System.Data.Common', you may need to supply runtime policy
* warning CS1701: Assuming assembly reference 'System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=a03g5k7f11m50r3a' used by 'UiPath.Database.Activities' matches identity 'System.Data.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=a03g5k7f11m50r3a' of 'System.Data.Common', you may need to supply runtime policy
Unfortunately there was no explanation as to where this error is occurring.
Any help would be appreciated, thank you.
Yes this will happen while conversion from legacy to windows.
If you are using any fileinfo expressions, in those expressions you have to made changes or any namespaces not imported, try importing those namespaces.
@ashokkarale
We actually rebuilt the entire project, except for certain workflows.
We tried using the migration tool but were left with 1000s of errors due to unsupported libraries, so we rebuilt the core workflows in a new project and copied over some of the migrated files and fixed any errors.
@mkankatala I tried to look for what you said but I don’t know where to look, we have over 40 workflows in our project. I don’t recall developing anything related to FileInfo, the only file related items are in our cleanup workflow where we loop through a folder to check for specific file names to delete before the next transaction. We are using a ForEachFileX activity for this
I figured out the solution. I started removing files 1 at a time and found that the ForEachFileInFolder Activity is broken. So I reverted to a regular foreach to solve my file cleansing needs.