asp.net – 两个DLL中都存在“ModelClientValidationRule”类型

我下载了 example written in asp.net mvc3 visual studio 2010的源代码

通过visual studio 2012打开解决方文件.它将源代码覆盖到2012年并打开解决方案.

当我构建解决方案时出错:

Error 1 The type ‘System.Web.Mvc.ModelClientValidationRule’ exists in
both ‘c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC
3\Assemblies\System.Web.Mvc.dll’ and ‘c:\Program Files (x86)\Microsoft
ASP.NET\ASP.NET Web
Pages\v2.0\Assemblies\System.Web.WebPages.dll’ C:\studyCode\MVCDemo-Part12\MVCDemo-Part12\MVCDemo\Attributes\Validation\EqualAttribute.cs 54 28 MVCDemo

解决方法

只需从解决方案引用中删除System.Web.WebPages

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....