We have a project that uses ef-migrations containing multiple (read ~60) migrations created over a long period of development. Naturally, some of these
As per msdn
"GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor."
Since you are not using any of the above tools but SqlCommand class to execute your Sql statement Sql Server (and not EF - see the stack trace where the exception originated) is choking on it