开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜