Build error: “An expression is too long or complex to compile”

后端 未结 10 1818
无人及你
无人及你 2020-12-11 15:57

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

10条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 16:34

    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..

提交回复
热议问题