I’ve seen this Index was out of range error within SQL Server Management Studio (SSMS) when trying to change the order of Agent Jobs.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index (mscorlib)
If I create a new SQL Agent Job, and add in 3 random steps…
Then try move the 3rd step highlighted above upwards in the step order.
The following error will show.
Googling the error leads on to some random .NET developer stuff… I’ve fixed the issue before by updating SQL Server Management Studio (SSMS), but I just tested this on the 18.0 RC1 build of SSMS and I was still able to recreate the issue. So, not sure what’s going on here yet!