Document is invalid Exception

Hello, can someone help me ??? why is my file saying its invalid??

Open Document Error: UiPath.Studio.Contracts.RecoverableException
—> UiPath.Studio.Contracts.RecoverableException: The item ‘C:\Users\delacrke\Documents\SAMPIAAI-RPA Processes UPDATED\RPA - DI\BIMP PRA\SN SP Month End\SN SP Month End.xaml’ could not be opened: Document is invalid.
—> RemoteException wrapping System.IO.InvalidDataException: Document is invalid
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.InitRootActivity(WorkflowDesigner designer, String filename)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.BuildInternal(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.Build(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerWrapper.Load(String fileName)
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.<>c__DisplayClass5_0.<b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.<>c__DisplayClass5_0.<b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Shared.MVVM.Services.DispatcherService.d__15.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Helpers.d__91.MoveNext() --- End of inner exception stack trace --- at UiPath.Studio.Core.Services.PersistableServiceBase3.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options) at UiPath.Studio.Shell.Services.DocumentService.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options)
at UiPath.Studio.Core.Services.PersistableServiceBase`3.OpenAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
— End of inner exception stack trace —
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenPath(String filePath)
at UiPath.Studio.Shell.Services.ProcessArgumentsService.ProcessWithCommandLine(String commandLineFileName)
at UiPath.Studio.Shell.ShellApplication.StudioShellApplication.<>c__DisplayClass23_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at System.Threading.Tasks.Task.<>c.b__140_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233088

Rename project.json to project_json.old and then open the XAML file.

Hi,

I guess you try to open xaml file which is generated in Windows project in Wndows legacy project.
So can you try to open the xaml file in Windows project?

Regards,

Hello,

I am facing the same problem…xaml file created in a windows project that I want to reuse in a legacy windows project cannot be opened.

In fact, I tried to copy and paste all the activities from the source xaml to the other project and it doesn’t work.

Any suggestions on how to accomplish this “reuse” of xaml without migrating the legacy windows project to the windows project or “copy and paste” all activities?

Thanks in advance