我正在将MVC项目与我当前的Web窗体应用程序集成。我使用Nuget将MVC安装到解决方案中(基于我做过的一些阅读,建议这样做会添加必要的二进制文件和配置)。然后我在解决方案中添加了一个新的MVC项目,并为MVC路由编辑了以下Global.asax.vb文件:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
MVC.RouteConfig.RegisterRoutes(RouteTable.Routes)
End Sub
但是当我运行应用程序时,我收到以下错误:
System Error
The view 'Index' or its master was not found or no view engine supports the searched
locations. The following locations were searched: ~/Views/Home/Index.aspx
~/Views/Home/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml ~/Views/Home/Index.vbhtml ~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml