asp.net運行時錯誤:沒有爲擴展名".cshtml"註冊的提供程序。

解決方法:html

一.web

 在machine.config或web.config中的<compilation><buildProviders>節註冊一個。請確保所註冊的提供程序具備包含值「web「或」all「的BuildProviderAppliesToAttribute特性
 在machine.config或web.config中修改原來的<compilation>

<compilation debug="true" targetFramework="4.5">
<buildProviders>
<add extension=".cshtml" type="System.Web.Compilation.PageBuildProvider"/>
</buildProviders>
</compilation>ide

相關文章
相關標籤/搜索