MVC AreaRegistration
Where is Class AreaRegistration ?****strong text Cannot find Class AreaRegistration in MVC 2 ? I Ha开发者_运维技巧ve installed MVC 2 Preview 2 (Had Preview 1 instlled but not used)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc;
namespace MvcAreasSingleProject.Areas.Blog { public class Routes : AreaRegistration
Gives missing using directive or an assembly reference error (Same error RegisterRoutes) Where is Class AreaRegistration ?
double check your references to system.web.mvc to make sure that it is version 2.0.0 I had the same problems with AreaRegistration and forgot to check.
It's in System.Web.Mvc assembly - make sure you've referenced version 2.0 (check Path and Version in Properties window after selecting reference in Solution Explorer)
http://msdn.microsoft.com/en-us/library/system.web.mvc.arearegistration.aspx
精彩评论