There's a maximum of 65535 characters in a line of code. (I had serialized a file for testing purposes into one line). If you exceed this line length, you'll get this error. I also went the route "repair" and that didn't work. I'm using VS 2017, C#, ASP.Net Core 2.1. 一行代码中最多有 65535 个字符。(为了测试目的,我已将一个文件序列化为一行)。如果超过此行长度,则会收到此错误。我也走了 “repair” 的路线,但没有用。我正在使用 VS 2017、C# ASP.Net Core 2.1。