【问题标题】:using RazorEngine v3 on Mono v2.10在 Mono v2.10 上使用 RazorEngine v3
【发布时间】:2012-08-24 19:42:16
【问题描述】:

有没有办法在 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 

【问题讨论】:

    标签: .net mono razorengine


    【解决方案1】:

    TL/DR:更新到 Mono 3.x。

    长话短说:在 Mono 2.10.x 发布时,Microsoft 尚未将 ASP.NET 堆栈作为开源完全发布(Razor 是仍然封闭源代码的组件之一)。

    最近微软终于开源了完整的堆栈,Mono 已将其包含在他们的树中,但这发生在 2.10 发布之后,不会被向后移植。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-19
      • 2014-06-29
      • 1970-01-01
      相关资源
      最近更新 更多