Conflicting versions of ASP.NET Web Pages detected: specified version is “1.0.0.0”, but the version in bin is “2.0.0.0”

前端 未结 3 1516
北荒
北荒 2020-12-15 15:53

This error appears after updating ASP.NET Web Helpers Library today to version 2.0 which was apparently released today. I updated by mistake, however would like to resolve t

相关标签:
3条回答
  • 2020-12-15 16:14

    From Conflicting versions of ASP.NET Web Pages detected: You need to set webpages:Version appSettings with appropriate value. In your case it has to be 2.0.0.0

    <appSettings>
        <add key="webpages:Version" value="2.0.0.0"/>
    </appSettings>
    
    0 讨论(0)
  • 2020-12-15 16:26

    You may refer to this question to get help

    Could not determine which version of ASP.NET Web Pages to use

    or you may read the instructions in the page

    http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2

    0 讨论(0)
  • 2020-12-15 16:35

    It seems to be something related to the new release (v.2.0) of the Microsoft.Web.Helpers, released on Jun/05/2012.

    To avoid this problem, first I uninstalled the new version (v.2.0):

    PM> Uninstall-Package microsoft-web-helpers

    And adopted the following command to install the stable older version:

    PM> Install-Package microsoft-web-helpers -Version 1.15

    I believe (and wish) this is something that will be corrected (or officially commented) soon...

    UPDATE

    If by any reason you need the older System.Web.WebPages.dll (which in my case was overwritten by a new version and didn't show up in the "Add Reference" box), it's located on:

    C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies

    0 讨论(0)
提交回复
热议问题