UiPath Robot command line dependency error

I am trying to run a workflow through UiPath Robot command line execution but it is throwing a FileNotFoundException.

The problem is: in Studio, it works without any problem of dependencies.
I am suspecting it is related to folder permissions.

Command line: C:\Program Files (x86)\UiPath\Studio>UiRobot.exe -file “C:\Work\Client\Client - Automation Name\Main.xaml”

Exception: An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.IO.FileNotFoundException: Could not load file or assembly ‘UiPath.Models, Version=, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
at UiPath.Core.Activities.LogMessage.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Your command line looks correct, so 2 things I would check are:

  1. the Main.xaml file that you show there actually does exist
  2. the project.json file in the same directory as the Main.xaml has a “main” that exists in the same directory, because sometimes if there is a file that doesn’t exist in the .json file then it can’t run.


try like below, quotes should be there robot path also and one more thing before UiRobot.exe try backslash

“C:\Program Files (x86)\UiPath\Studio\UiRobot.exe” -file “C:\Work\Client\Client - Automation Name\Main.xaml”

Instead -file u can also use -f or \file options.

It is all set up like you said.
It works when I run on Studio, but not on Robot command line.

It did not worked.
I am having the same error as before.