Class AreaRegistration在哪里?****强文在MVC 2中找不到Class AreaRegistration? 我已经安装了MVC 2预览2(已预设1但未使用)
使用System;使用System.Collections.Generic;使用System.Linq;使用System.Web;使用System.Web.Mvc;
命名空间MvcAreasSingleProject.Areas.Blog { 公共类路线:AreaRegistration
使用缺少使用指令或程序集引用错误(相同错误RegisterRoutes) Class AreaRegistration在哪里?
答案 0 :(得分:0)
仔细检查您对system.web.mvc的引用以确保它是版本2.0.0我遇到了与AreaRegistration相同的问题而忘记检查。
答案 1 :(得分:0)
在System.Web.Mvc程序集中 - 确保您引用了2.0版(在解决方案资源管理器中选择引用后在“属性”窗口中检查路径和版本)
http://msdn.microsoft.com/en-us/library/system.web.mvc.arearegistration.aspx