terjetyl
terjetyl

Reputation: 9565

asp.net mvc 3 strongly typed ViewData-Model compilation error

I have a site originally build with MVC1 later migrated to MVC2 and now I am trying to migrate it to MVC3 but I am having some trouble compiling my strongly typed ViewData.Model

The Page directive is correctly set but the compiler does not seem to pick up the correct class and complains the ViewData.Model is of type object.

Anybody had any luck solving this problem?

Intellisense seem to pick up the type correctly but not the compiler

Upvotes: 2

Views: 513

Answers (1)

SLaks
SLaks

Reputation: 887365

Check the assembly names and versions in your Web.configs.

You probably have a reference to an System.Web.Mvc.dll v2.

Upvotes: 3

Related Questions