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"
Asked Answered
N

3

49

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 this now, if possible.

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". To continue, remove files from the application's bin directory or remove the version specification in web.config.

Apparently this is the problem in web.config:

<add key="webpages:Version" value="1.0.0.0" />

Does anyone even have any information about this ASP.NET Web Helpers Library package 2.0? I was unable to find release notes. Nothing on Nuget site.

Nilla answered 5/6, 2012 at 11:57 Comment(2)
I guess the helpers library package 2.0 works with Asp.Net web pages 2.0.0.0 version. I got one link but not sure if it is for 2.0 or earlier asp.net/web-pages/overview/more-resources/…Toole
Thanks for the docs. The differences are marked with v2 which is fine. Still, they'd need to provide release notes and some heads up warning.Nilla
R
94

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>
Revocable answered 8/1, 2013 at 15:45 Comment(2)
+1, what a joke, this took down our entire Azure instances for one simple app.config key.Maibach
Changing frameworks can cause this error. I ran into about 10 of them dropping from 4.5.2 to 4.0 to work on our server.Virgel
S
8

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

Skylar answered 6/6, 2012 at 22:24 Comment(2)
I can't find a System.Web.Pages.dll. I think this should be System.Web.WebPages.dllMersey
apparently the asp.net web helpers library package no longer supports MVC - that is, the new version of this package (2.0+), so the only way to use it is to use 1.15. Installing 1.15 results in Package Updates to always show updates for this package and can easily result in installing the new version by mistake and screw things up. That's why I'm removing the dependency on this package in our projects and just use other means to use Twitter, Recaptcha etc. For ReCaptcha there is even a standalone package..Nilla
C
0

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

Clingfish answered 13/11, 2014 at 15:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.