Had the same cryptic error message after pasting some public static class definition between the Robot class attributes
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
and the cbot class inheriting the Robot class
public class myAlgo : Robot {
Moving back the first line right above the latter one solved the problem.
So I guess your problem is similar, check your classes attributes.