[英]How to make NHaml work with Asp.net MVC 6
I'm trying to use NHaml as the ViewEngine in my asp.net MVC 6 Project. 我正在尝试将NHaml用作asp.net MVC 6项目中的ViewEngine。 I'm running this project on my OSX system via Mono.
我正在通过Mono在OSX系统上运行此项目。 The NHaml documentation https://code.google.com/p/nhaml/wiki/Configuration says to use a .xml config file.
NHaml文档https://code.google.com/p/nhaml/wiki/Configuration说要使用.xml配置文件。 But it looks like MVC 6 doesn't support xml config any more
但看起来MVC 6不再支持xml配置
'IConfigurationSourceRoot' does not contain a definition for 'AddXmlFile'
and no extension method 'AddXmlFile' accepting a first argument
of type 'IConfigurationSourceRoot' could be found
(are you missing a using directive or an assembly reference?)
How can I transfer this config to json syntax or just simply make this config right in code? 我如何才能将此配置转换为json语法,或者只是简单地在代码中进行配置? This question maybe confusing, due to my very limited experience with .net.
由于我对.net的经验非常有限,因此这个问题可能令人困惑。
好吧,我仍然没有让它运行,但是我想我向前迈了一步,因为我知道如何使AddXmlFile()
再次工作,并将此行添加到project.json:
"Microsoft.Framework.ConfigurationModel.Xml": "1.0.0-beta4",
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.