日期:2014-05-20  浏览次数:20420 次

新建的MVC项目出错……
新建的项目
直接按F5,出现以下错误:
错误 1 类型“System.Web.Mvc.ModelClientValidationRule”
同时存在于“C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\System.Web.WebPages.dll”
和“C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll”
D:\wksp\ServicesDataMgr\ServicesDataMgr\Models\AccountModels.cs 242 28 ServicesDataMgr

错误 2 类型“System.Web.Mvc.ModelClientValidationStringLengthRule”
同时存在于“C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\System.Web.WebPages.dll”
和“C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll”中D:\wksp\ServicesDataMgr\ServicesDataMgr\Models\AccountModels.cs 245 21 ServicesDataMgr

版本:asp.net mvc 3
vs 2010 sp1

------解决方案--------------------
移除相关引用,重新添加

同时注意命名空间