C# – Conflicting versions of ASP.NET Web Pages detected

asp.netasp.net-mvc-3cvisual studio 2010

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.

Best Answer

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>