UiPath Studio corrupts project XML file after changes

with latest Studio Community 2020.10.2, I regularly have Studio write a corrupted project XML when removing elements. I then get an error that the project file has XML errors and cannot start the project.

Opening the XML in e.g. VS Code, I can see that it has shortened the XML file (removing the element I deleted in the UI), but it seems it did not update the EOF marker, e.g. misses to flush the file output stream or similar, so I can see the old content at the end of the XML still being there.

Removing that old trailing content “repairs” the XML and everything works fine again in Studio.

1 Like

here’s an example: after the end project tag, the old trailing content shows up in the file:

          </ui:WindowScope.Body>
    </ui:WindowScope>
  </Sequence>
</Activity>     </scg:Dictionary>
                          </sap:WorkflowViewStateService.ViewState>
                        </Sequence>
                        <Sequence DisplayName="Desktop"     sap:VirtualizedContainerService.HintSize="726,83"     sap2010:WorkflowViewState.IdRef="Sequence_8">
                          <sap:WorkflowViewStateService.ViewState>
                            <scg:Dictionary x:TypeArguments="x:String, x:Object">
                              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                            </scg:Dictionary>
                          </sap:WorkflowViewStateService.ViewState>
                        </Sequence>
                      </Sequence>
                    </Sequence>
                  </ActivityAction>
                </ui:WindowScope.Body>
              </ui:WindowScope>
            </Sequence>
          </Sequence>
        </ActivityAction>
      </ui:WindowScope.Body>
    </ui:WindowScope>
  </Sequence>
</Activity>