Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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" in ASP.MET MVC 3

I am getting the following error after installing microsoft web helper:

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.

From what I read, I might have tried instaling the wrong version. But how do i orrect this? So far, I have

  • uninstall the microsoft web helper
  • Deleted and content of the bin folder and rebuild the project
  • Replace my web.config file with a new file with all defaults (given i did not change much here or my project.

But none of these (as suggested online) worked. Any hint on how to solve this please. Ihave been at this for hours now

like image 770
jpo Avatar asked Dec 15 '12 14:12

jpo


2 Answers

I had this issue after upgrading to VS 2013 Express Preview.

Then I noticed there was a line in web.config that was:

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

Changed it to the version of system.web.webpages.dll in my bin folder:

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

...and the problem went away. (in your case I guess it's 2.0.0.0.)

like image 173
Dave Avatar answered Oct 11 '22 13:10

Dave


This is just an addendum to Dave's answer but don't forget to change this in all the Views folders also, if you haven't. The best thing probably is to use the "Replace in Files" feature from VS (Ctrl+Shift+H) to ensure you didn't miss any occurrence.

like image 33
JJP Avatar answered Oct 11 '22 15:10

JJP