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”

拥有回忆 提交于 2019-11-29 00:53:24
Jeroen K

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>

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!