簡體   English   中英

如何使NHaml與Asp.net MVC 6一起使用

[英]How to make NHaml work with Asp.net MVC 6

我正在嘗試將NHaml用作asp.net MVC 6項目中的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的經驗非常有限,因此這個問題可能令人困惑。

好吧,我仍然沒有讓它運行,但是我想我向前邁了一步,因為我知道如何使AddXmlFile()再次工作,並將此行添加到project.json:

 "Microsoft.Framework.ConfigurationModel.Xml": "1.0.0-beta4",

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM