Hi all, I have a problem that is driving me nuts. I am encountering the following error-message: " Object reference not set to an instance of an object"
I have an empty activity, completly empty, which runs fine when empty. But the moment when I add any activity it throws the error. Like here, I add a simple log acitivity, then it fails:
20.10.4+Branch.master.Sha.6a6cfd6dfbeb86aec47564af2f9465ef0bf43df4
Source: Invoke Process workflow
Message: Compilation failures occurred:
An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2.System.get' An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2.System.get' An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2_ForReadOnly.System.get' An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2_ForReadOnly.System.get'
Complete results are contained in the Data property of this exception. Please correct the errors in the source and retry the Load.
Exception Type: System.InvalidOperationException
RemoteException wrapping System.InvalidOperationException: Compilation failures occurred:
An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2.System.get' An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2.System.get' An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2_ForReadOnly.System.get' An object reference is required for the non-static field, method, or property 'Process_CompiledExpressionRoot.Process_CompiledExpressionRoot_TypedDataContext2_ForReadOnly.System.get'
Complete results are contained in the Data property of this exception. Please correct the errors in the source and retry the Load.
at System.Activities.XamlIntegration.ActivityXamlServices.Compile(IDynamicActivity dynamicActivity, LocationReferenceEnvironment environment)
at System.Activities.XamlIntegration.ActivityXamlServices.Load(XamlReader xamlReader, ActivityXamlServicesSettings settings)
at System.Activities.XamlIntegration.ActivityXamlServices.Load(XmlReader xmlReader, ActivityXamlServicesSettings settings)
at System.Activities.XamlIntegration.ActivityXamlServices.Load(Stream stream, ActivityXamlServicesSettings settings)
at UiPath.Executor.WorkflowRuntime.Load(String workflowFile)
at UiPath.Executor.InProcessRunner.BeginExecute(AsyncCallback callback, Object state)
at UiPath.Core.Activities.ExecutorInvokeActivity.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.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)
EDIT: Nevermind, I had a variable with the name “System”. When I removed that everything works. Forgot that it is a protected name (at least I assume it is).