本文介绍了并排安装错误MVC 4 Beta版侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装的MVC 4 Beta版现在我的MVC 3应用程序不与下面的错误编译:

I just installed the MVC 4 Beta now my MVC 3 application does not compile with the following error:

该型'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:\\用户\\ michaeljo \\文件的\\ src \\ patientgive \\ Phc.Mvc \\基础设施\\ PasswordStrengthAttribute.cs

这样看来这已被移动到不同的组件,并且自两个组件是在GAC它不知道使用哪一种。

It would appear this has been moved to a different assembly and since both assemblies are in the GAC it does not know which to use.

推荐答案

今天安装公测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 "/>

这篇关于并排安装错误MVC 4 Beta版侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 17:52