Every now and then when I build a specific solution, I\'ll get a random amount of \"An expression is too long or complex to compile\" in the Error List window. However, the
I got this problem today. Somehow I got a really long string in my index.cshtml
file. So check for long strings that can cause this problem.
If cleaning and rebuilding works, it's obviously not a problem with your code. You should report this to Microsoft, seems like a VS bug.
i got this error cause of very big svg file. and after google it and some personal experiment i found that the solution for big svg file is:
@Html.Raw(File.ReadAllText(Server.MapPath("~/image.svg")))
in razor file there is another approach with html partial but unfortunately this trick is not working with big svg file.
hope this help..
I got this problem today in visual studio 2019. I got a really long string
<img height="445" src="data:image/png;base64,iVBORw...
in my file.aspx file. Even long images in vs2019 that can cause this problem.