生成错误 - “System.Web.Mvc.ModelClientValidationRule'冲突 [英] Build Errors - 'System.Web.Mvc.ModelClientValidationRule' Conflicts
问题描述
我想'打造'我在VS2010 MVC3 Web应用程序但不断收到以下错误:
I am trying to 'build' my MVC3 web app in VS2010 however keep getting the following error:
错误2类型'System.Web.Mvc.ModelClientValidationRule中都存在C:\\ Program Files文件(x86)的\\微软ASP.NET \\ ASP.NET MVC 3 \\组件\\ System.Web.Mvc.dll程序和C:\\ Program Files文件(x86)的\\微软ASP.NET \\ ASP.NET网页\\ 2.0 \\组件\\ System.Web.WebPages.dll'C:\\用户\\ brownp \\文档\\ Visual Studio 2010的\\项目\\驾驶室\\驾驶室\\ \\型号223 AccountModels.cs 28驾驶室
Error 2 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:\Users\brownp\Documents\Visual Studio 2010\Projects\Cab\Cab\Models\AccountModels.cs 223 28 Cab
另外,我每次打开解决方案时,它会提示我以下内容:
Also, every time I open the solution, it prompts me with the following:
我通过Web平台安装程序安装和但是消息再次出现每次我开解一次安装成功。
I install via Web Platform Installer and it installs successfully however the message reappears every time I open the solution.
任何人都可以提供任何指导?
Can anyone offer any guidance?
感谢保罗
推荐答案
今天安装公测MVC4后,我的几个MVC 3的项目将不会编译。 (ModelClientValidationRule冲突)此修复程序是:
After installing MVC4 beta today, a few of my MVC 3 projects would not compile. (ModelClientValidationRule conflict) The fix was:
编辑:
ProjectName.csproj
修改
<Reference Include="System.Web.WebPages"/>
要
<Reference Include="System.Web.WebPages, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/>
这篇关于生成错误 - “System.Web.Mvc.ModelClientValidationRule'冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!