Cannot able to open the XAML file

I had the same issue and I solved it by:

  1. Remove files under “.local” folder inside the project folder (Note: It can be hidden).
  2. Remove/Rename “project.json” file.
  3. Double click the “Main.xml” to Open.
  4. The project will now be opened. But you might get some error messages (because of missing packages).
  5. Add necessary packages using “Manage Packages”. - In my case I just had to add “Workflow manager activities (Microsoft.Activities)”
  6. Save the project.

Problem Solved.

3 Likes

just deleting project.json did not work but with both .local and project.json deleted worked. Thanks :slight_smile:

1 Like

Hi,
I am having the same issue. I tried deleting the .json file + .local, tried re-opening the file but still the xaml file wouldn’t open and it gives the same error. Were you able to find a solution???

Whereas anti-virus is concerned, the same xaml was working before but after I copied a few other workflows into my main xaml, this issue started appearing. All of my 3 months worth of work is lost. If someone can please let me know what finally worked for them ( I am using community version)

Error details:
18.4.3+Branch.master.Sha.9888b477be8d3ec8a832306fc59c34ba6edad108

An internal error has occurred. It is recommended to restart UiPath Studio.

Error: System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Activities.Core.Presentation.FlowchartDesigner.SetFlowElementModelItem(UIElement view, ModelItem model) at System.Activities.Core.Presentation.FlowchartDesigner.ProcessAndGetModelView(ModelItem model) at System.Activities.Core.Presentation.FlowchartDesigner.AddFlowElementsToDesigner(IList1 flowElementMICollection, Boolean addConnectorAfterLoaded)
at System.Activities.Core.Presentation.FlowchartDesigner.PopulateFlowchartChildren()
at System.Activities.Core.Presentation.FlowchartDesigner.OnFreeFormPanelLoaded(Object sender, RoutedEventArgs eventArgs)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
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 -2147467261

Hi,
I am getting a similar message that started on April 18, 2019 on my UiPath Studio that “corrupted” a xaml file. See Error below.

Hi @apage

Have you managed to resolve this issue? It is possible that you will have to redo your workflow file from scratch if it got corrupted :frowning:

I have the same error, and I’ve detected that this appear when I try copy a lot of elements into the same workflow. I tried delete the .local folder and .json project and I’ve had the same error. I think to solve is create a new elements avoid copy and save the robot versions if you need recover your information.

I finally solved the error.

In my project, some of xaml files get error “Type ‘UiPath.Database.DatabaseConnection’ is not defined.”. I’ve tryed delete “.local” folder and “project.json” but that did’t solve the problem.

So, I just redo the activities, without using Ctrl + C and Ctrl + V. It solved the problem!

1 Like