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.
Resolution:
From 2019.4.x onwards, an option is present to disable secure Xaml during installation or after installation.
- 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.
- 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.