It's about the @ character, this example works before upgrade
@{
string @class = ViewBag.@class;
IDictionary htmlAttributes = new Dictionary();
}
After upgrade, it must be separated into two blocks
@{ string @class = ViewBag.@class; }
@{ IDictionary attrs = new Dictionary(); }