Updated all project packages and now Directory.Exists does not work

Hi,

Encountering the following Error:

BC30561: ‘Directory’ is ambiguous, imported from the namespace or types ‘system.IO, Microsoft.graph’.

Further Information:
Have been using condition “Not Directory.Exists(FileDestinationFolder) = True” within an If Statement for a long time and all has been good.

Recently updated all packages and then the issue occurred.

Replicated the behaviour within another project. Implemented same code, updated packages and then encountered the same issue.

Looking at the error message I went looking for the namespaces and found Microsoft.Graph belongs to the UiPath.Mail.Activities package. However, UiPath will not let me downgrade version to test if this is the issue.

Not sure what package System.IO belongs to.

Any ideas how to resolve error?

Thanks,

@Byrnecut,

Use it like this.

Not System.IO.Directory.Exists(FileDestinationFolder) = True

Thanks,
Ashok :slight_smile:

1 Like

Hello @Byrnecut

You can either append System.IO to your IF-sentence, or you can try and make Studio remove unused imports by clicking “Remove Unused” → “Imports” in the top navigation bar.

Not System.IO.Directory.Exists(FileDestinationFolder)

Best regards,
Soren

1 Like

Thank you for the help.

1 Like

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