SendEmail exception When Running Studio from Command Line


#1

My workflow running perfectly when I am using Studio to run.
But when I ran following command from Command Line, it is giving me mentioned exception.

C:>C:\Program Files (x86)\UiPath\Studio\UiRobot.exe" /file: "C:\Users\User\Documents\UiPath\InvoiceUploadProcess\Main.xaml"

upload_invoice_files System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}SendMail’.

at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)

at System.Xaml.XamlWriter.WriteNode(XamlReader reader)

at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)

at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()

at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)

at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)

at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)

at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)

at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)

at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)

at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)

at System.Activities.WorkflowApplication.EnsureInitialized()

at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)

at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)

at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)

at UiPath.Executor.RobotRunner.<>c__DisplayClass54_0.<OnInvokeJob>b__0()


#2

Can anyone help on this issue?


#3

Hi @atulgupta5

This is what i found, have you published your project?
If not, then try to execute after publishing

Still not resolved, then tell me which version you are using as it there’s some problem with version 18.2.
You can refer below post


#4

After publishing - it worked. Thanks @Bharat
BTW, my version is 18.2.3 but still worked after publishing.