views:

168

answers:

2

My ASP.NET MVC application fails with this error:

BC30456: 'Title' is not a member of 'ASP.views_controllername_viewname_aspx'.

But, Title doesn't appear anywhere except the first line of my View.

<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of SomeThing)" %>
A: 

My strongly-typed view was of a non-existant type. I had changed the object's name.

<%@ Page ... Inherits="System.Web.Mvc.ViewPage(Of CorrectThing)" %>

vs.

<%@ Page ... Inherits="System.Web.Mvc.ViewPage(Of WrongThing)" %>
Zack Peterson
+1  A: 

I've had this problem in a MVC application that reference entities from another project. The solution was to add the assembly in web.config

< add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

Thought I post in case someone else runs into the same problem.

P-H