我正在尝试在我的asp.net MVC 6项目中使用NHaml作为ViewEngine。 我通过Mono在我的OSX系统上运行这个项目。 NHaml文档https://code.google.com/p/nhaml/wiki/Configuration表示使用.xml配置文件。但看起来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?)
如何将此配置传输到json语法或只是简单地在代码中进行此配置?由于我对.net的经验非常有限,这个问题可能令人困惑。
答案 0 :(得分:0)
嗯,我仍然没有让它运行,但我想我向前迈了一步,因为我知道如何让AddXmlFile()
再次工作,将这一行添加到project.json:
"Microsoft.Framework.ConfigurationModel.Xml": "1.0.0-beta4",