after upgrade, all the pages see Models as Object.
I’ve upgraded using migration guide here
basically just copying some scripts, and re-mapping mvc assembly reference to 3.0
For some reason, all of my controls are now not seeing any properties on my models.
here is how i define the model type:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<WebMVC.Models.WeatherModel>" %>
usage:
<%: Html.TextBox("DateFromText", Model.DateFrom.ToShortDateString())%>
i now get compile errors that “object” does not contain definition for AnyProperty.
UPDATE
thanks to SLax i fixed the object issue. Now getting the following error:
The type ‘System.Data.Objects.DataClasses.ComplexObject’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.
ok.. fixed this by adding assembly reference in web.config:
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
You probably have references to System.Web.Mvc.dll version 2 in one of the two Web.config files.