我正处于开发Azure Web项目的早期阶段,可能需要六个多月才能完成。构成UI的视图将受益于MVC 3预览1中的Razor视图引擎提供的清晰语法。
只要网站作为Azure网络角色运行,就会抛出以下异常:
InvalidOperationException: The view 'Index' or its master was not found. The following locations were searched: ~/Views/Content/Index.aspx ~/Views/Content/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx ~/Views/Content/Index.cshtml ~/Views/Shared/Index.cshtml
备注:
修改
答案 0 :(得分:2)
右键单击ActionResult方法并选择“添加视图”时,CSHTML视图文件在视图目录中创建,但文件的Build Action属性设置为“None”而不是“Content”。