0

我正在尝试在我的 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 的经验非常有限,这个问题可能令人困惑。

4

1 回答 1

0

好吧,我仍然没有让它运行,但我认为我向前迈了一步,因为我知道如何AddXmlFile()再次工作,将此行添加到 project.json:

 "Microsoft.Framework.ConfigurationModel.Xml": "1.0.0-beta4",
于 2015-06-21T14:10:52.690 回答