Error "System.ArgumentException: The Path Is Not Of A Legal Form" Thrown When Launching A Job

When launching a job, the following error is thrown randomly: "Error: System.ArgumentException: The path is not of a legal form" .

When launching a job, the following error occurs randomly:

"Erreur: System.ArgumentException: Le chemin d'accès n'a pas une forme conforme. (Error: System.ArgumentException: The path is not of a legal form)".

As the problem occurs intermittently, it may be caused by some long paths that appear for some of the files whose Git status needs to be updated after the operation.



Resolution: It is recommended to add the following settings in the Studio configuration file (C:\Program Files(x86)\UiPath\Studio\UiPath.Studio.exe.config), in the runtime section:


If there are already some values defined for the AppContextSwitchOverrides setting, add these 2 new values in the end as shown below:

After that, restart Studio and verify.