commented line of code that was giving error.
//ScriptRuntime.RunScope(code, _Console.Scope);

From ExecCommand.cs