O.O O.O - 6 months ago 59
ASP.NET (C#) Question

Type 'ASP._Page_index_cshtml' does not inherit from 'System.Web.WebPages.WebPage'

I am getting:

Type 'ASP._Page_index_cshtml' does not inherit from 'System.Web.WebPages.WebPage'.

when I browse to my index.cshtml file. It is very simple:

@using System.Web.Optimization
@inherits System.Web.Mvc.WebViewPage
<!DOCTYPE html>
<html class="no-js" lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width">
<title>Hello World</title>
@Styles.Render("~/Content/css", "~/Content/themes/base/css")

my index.cshtml file is outside of the Views folder, if that matters at all.


I just had to remove: @inherits System.Web.Mvc.WebViewPage

Looks like I had a copy paste error when reorganizing my project.