15

I just moved from php to asp.net. I'm trying to deploy a very basic mvc 3 application to my hosting provider. After it deploys, I visit the website, and it displays:

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.

I'm not sure where to look. Its the 'out of the box' mvc 3 application with no modification. I tried to use this method, "http://stackoverflow.com/questions/10896878/conflicting-versions-of-asp-net-web-pages-detected-specified-version-is-1-0-0" but had no luck.

Any help would be appreciated.

Anonymous
  • 1,978
  • 2
  • 28
  • 37

4 Answers4

28

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>
Brij
  • 11,731
  • 22
  • 78
  • 116
  • This was very useful, thanks so much. I was trying to resolve this issue with MonoDevelop while creating a basic Mvc3 project. – imesh May 09 '13 at 00:36
  • useful information, however, the cannot be the first element inside – clam Oct 29 '13 at 02:51
0

Please check below link, you would probably have to check the assembly version in bin directory

http://www.britishdeveloper.co.uk/2011/11/conflicting-versions-of-aspnet-web.html

Ravi Vanapalli
  • 9,805
  • 3
  • 33
  • 43
  • I've read that link before I posted and it didnt help. Maybe because I didnt understand. I dont have a System.Web.WebPages.Deployment deployment. I'm also confused with the target framework. It's set to 4.0. What's the difference between the wepages version and the target framework? – Anonymous Jun 14 '12 at 13:16
  • You can try removing one dll at a time in your bin folder and check if it works. – Ravi Vanapalli Jun 14 '12 at 13:23
  • It only does this when I publish the site. it doesnt happen on the development server... – Anonymous Jun 14 '12 at 14:37
0

If you have already tried the above solutions and are still getting the same problem then try this one-> Go to your project folder and in there locate the bin folder --> Remove System.Web.Mvc.dll and System.Web.Mvc.xml from there.

Krishna
  • 5,194
  • 2
  • 28
  • 33
0

I had this error in webmatrix, to solve it I had to go to settings and update ASP.NET web pages version from 1.0 to 2.0

BoNDoK
  • 135
  • 2
  • 4
  • 12