Conflicting versions error adding ASP.NET MVC 3 Web Role to Windows Azure project

Danny picture Danny · Nov 21, 2011 · Viewed 8.2k times · Source

I am getting the following error creating a new project after installing Windows Azure Tools 1.4:

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.

Answer

BritishDeveloper picture BritishDeveloper · Nov 29, 2011

You'll find you have an assembly in your bin folder that is a different version from the one mentioned in the web.config. The weird bit is that it may not be the assembly that the message suggests. It may be a descendent of that.

I had this problem whereby it claimed version of System.Web.WebPages in the bin folder was 2.0.0.0 but it was definitely 1.0.0.0 when I checked. It then turned out that it was System.Web.WebPages.Deployment that was version 2.0.0.0. After removing that assembly the error went away. I wrote a blog post on this: Conflicting versions of ASP.NET Web Pages detected