Main.xaml Is Missing From Package Folder In Non Persistent VDI After Reboot Of Server

How to fix the error "Main.xaml is missing" that appears when the process is executed by UiPath Robot?

Issue Description: In a non-persistent VDI Citrix infrastructure , there is policy which would wipe out the entire user data during reboot. However before removing the entire data , the user profile is copied to a centralized repository and is copied back to the machine when the same user is logged in. The issue arises for main.xaml as it is a read only file and cannot be modified or written unless the user is administrator, this is an additional security imposed to ensure packages are not modified.

From 2019.4.x onwards, an option is present to disable secure Xaml during installation or after installation.

  1. During Installation
In the Platforminstaller.exe, Disable Secured Xaml should be checked as shown in screenshot below. Alternatively, the configuration can be done via command line parameters (DISABLE_SECURE_XAML) using the MSI installer for Studio\Robot as detailed in the documentation.
  1. After Installation
Modify uipath.config file present in location C:\Program Files (x86)\UiPath\Studio . Ensure disablesecurexaml is set to "true" and the Robot service has to be restarted after making this change. To restart the service, follow the below steps:
  • Navigate to Windows start menu and type Services.msc and press Enter.
  • Search for UiPath Robot and select it.
  • Right-click and choose Restart option.