zoukankan      html  css  js  c++  java
  • 同时安装vs2010和VS2012后IEnumerable<ModelClientValidationRule>编译错误

    错误    4    类型“System.Web.Mvc.ModelClientValidationRule”同时存在于“c:Program Files (x86)Microsoft ASP.NETASP.NET Web Pagesv2.0
    AssembliesSystem.Web.WebPages.dll”和“c:Program Files (x86)Microsoft ASP.NETASP.NET MVC 3AssembliesSystem.Web.Mvc.dll”中
    查阅一些资料后,解决方法如下:
    
    Step 1
    
    修改Web.config,在 <appSettings>新增<add key="webpages:Version" value="1.0.0.0"/>
    <appSettings>       
     <add key="webpages:Version" value="1.0.0.0"/>    
    </appSettings> 
    Step 2
    
    关闭解决方案
    
    用记事本打开 项目名称.csproj
    
    找到
    
    1 <Reference Include="System.Web.WebPages"/>   
    2 <Reference Include="System.Web.Helpers" />
    改成
    
    <Reference Include="System.Web.WebPages, Version=1.0.0.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/>       
    <Reference Include="System.Web.Helpers, Version=1.0.0.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    保存,OK。现在再重新打开编译一下试试。
  • 相关阅读:
    2019/10/9 CSP-S 模拟测
    简单的面向对象
    魔术变量
    函数
    全局变量
    超级全局变量
    for循环
    while循环
    php数组排序
    python打造XslGenerator
  • 原文地址:https://www.cnblogs.com/chenyongblog/p/3334268.html
Copyright © 2011-2022 走看看