开发者

MVC AreaRegistration

开发者 https://www.devze.com 2022-12-09 15:21 出处:网络
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)

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

精彩评论

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

关注公众号