2012-08-24 51 views
3

在Mono v2.10上有使用RazorEngine v3的方法嗎?在Mono v2.10上使用RazorEngine v3

嘗試解析模板時出現以下錯誤。

TypeLoadException: A type load exception has occurred. 
    at RazorEngine.Templating.TemplateService.CreateTemplateType (System.String razorTemplate, System.Type modelType) [0x00000] in <filename unknown>:0 
    at RazorEngine.Templating.TemplateService.CreateTemplate[<>f__AnonymousType0`2] (System.String razorTemplate, .<>f__AnonymousType0`2 model) [0x00000] in <filename unknown>:0 
    at RazorEngine.Templating.TemplateService.Parse[<>f__AnonymousType0`2] (System.String razorTemplate, .<>f__AnonymousType0`2 model) [0x00000] in <filename unknown>:0 
    at RazorEngine.Razor.Parse[<>f__AnonymousType0`2] (System.String razorTemplate, .<>f__AnonymousType0`2 model) [0x00000] in <filename unknown>:0 

回答

0

TL/DR:更新到單聲道3.x.長篇小說:當Mono 2.10.x發佈時,微軟並沒有完全公開ASP.NET源代碼作爲開源(Razor是仍然是封閉源代碼的組件之一)。

最近微軟終於打開了整個堆棧,Mono已經將它包含在它們的樹中,但是這發生在2.10發佈之後並且不會被反向移植。

更長的故事:http://tirania.org/blog/archive/2012/Mar-28.html