ok this explains the validation issue. @marci080 was refering to the project.json file from your UiPath project. Just close uipath, navigate to Uipath project. locate the project.json file. Edit it in an editor and change the programming languague to VB
When you newly create or open an xaml in UiPath Studio, there are some folders and files generated automatically. Amongst them is the project json file.
(Just like what happened when I opened your Reconcile.xaml file in my Downloads folder.)
You may learn more about it here
Though I personally do not recommend manually editing the json file because some activities may not work/appear properly and will make debugging more complicated.
Anyways, to address your original issue, maybe you can create a blank project (in VB) and just test first the suggested fix to check if the error no longer appear. Then start from there ~
To me it looks more like a generic syntax error.
The code highlighting suggests that the last part of your expression is interpreted as an unfinished string, purely goin on the syntax highlighting.
If I look closely at the screenshot it looks as if different types of double quotes are used, which might cause the syntax error. Did you by any chance copy paste the ‘c:\users…’ part from a word document?
Your expression looks fine in syntax. Try typing it in manually fully once, and see if that makes the difference…
Yes, I agree @Jeroen_van_Loon ! My original answer was about syntax error including the misused quotation marks since C# is somehow “strict”
Though I found out that if in VB, @Maria99 `s original code will amazingly work even without changing the mismatched quotations!
Directory.GetFiles(“C:\Users\Tiff\Downloads”,"*.csv”,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime)(0)
Directory.GetFiles("C:\Users\Tiff\Downloads","*.csv",SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime)(0)
Directory.GetFiles("C:\\Users\\Tiff\\Downloads","*.csv",SearchOption.AllDirectories).OrderByDescending(d => new FileInfo(d).CreationTime).ElementAt(0)
Though this ticket isresolved, I just want to add this detail for future reference.