After upgrading XenDesktop 5.x farm to XenDesktop 7.0, one of the following error dialog is displayed:
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex"
"The given key was not present in the dictionary."
This issue has been addressed and fixed with the release of XenDesktop 7.1 or the latest XenDesktop version now available.
If you cannot upgrade to the latest XenDesktop version, use the following Workaround:
If the upgrade is performed on a production environment and settings cannot be easily removed, a temporary XenDesktop 5.x server can be created:
Install a single XenDesktop 5.x server.
Note: Only the controller components are required and no Virtual Delivery Agent (VDA) software is required. Assume the name of this server is XD-Temp.
Assume the production Controller is XD-Prod, on this server, run the PowerShell commands that export the policies to a text file. Name this file as policies.txt.
Copy the file policies.txt to a network location where it is accessible from XD-Temp. Then on XD-Temp, run the PowerShell commands to import the policies from policies.txt.
On XD-Temp, run Citrix Desktop Studio and remove all the monitoring policies.
Upgrade XD-Temp to XenDesktop 7.0.
To use Citrix XenDesktop PowerShell commands, launch a PowerShell command line window, and execute the following PowerShell command:
Add-PSSnapin Citrix*
After the Citrix PowerShell snapins are added to a PowerShell session, use the following broker command to export the policies to a text file named policies.txt:
Export-BrokerDesktopPolicy > policies.txt
To import policies from a text file that contains exported policy data, use the following broker command after the Citrix PowerShell snapins are added:
Import-BrokerDesktopPolicy (Get-Content policies.txt)
A set of policy setting definitions are mistakenly removed from XenDesktop 7.0. These settings were introduced in XenDesktop 5.x. If one of the settings is used by a XenDesktop 5.x deployments, the XenDesktop 7.0 group policy code is not able to properly process the settings because the definitions do not exist in the code. So, the exceptions are thrown. The exceptions might be manifested as different types, depending on the place where the code first accesses the data that requires the missing setting definitions.
The missing settings are:
CPU Usage Monitoring
Enable CPU Usage Monitoring
CPU Usage Monitoring Period
CPU Usage Monitoring Threshold
ICA Latency Monitoring
Enable ICA Latency Monitoring
ICA Latency Monitoring Period
ICA Latency Monitoring Threshold
Enable Profile Load Time Monitoring
Profile Load Time Monitoring Threshold
Profile Load Time Monitoring
If any one of the preceding settings are used, an error dialog is displayed.