Deploying an MVC 2.0 .Net 4.0 application to Windows Server 2003

Posted by Brett Rigby on Stack Overflow See other posts from Stack Overflow or by Brett Rigby
Published on 2010-05-19T20:51:27Z Indexed on 2010/05/21 14:20 UTC
Read the original article Hit count: 722

I've spent the past couple of nights on this, and have come to the conclusions that I'm doing something wrong!

Basically, I have my .Net 4.0 MVC 2.0 application deployed to my 2003 Server and it's constantly giving me the following error:

The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the element of the Web.config file.

I also have the .Net 3.5 MVC 1.0 application also deployed to the same server (from before the upgrade to .Net 4.0), and it works absolutely fine.

  • I have re-run through Phil Haack's post on IIS6, making the necessary changes for .Net 4.0, but no luck.
  • I have been through the steps in the British Developer's post too, but no joy.
  • I have also tried the steps outlined in Johan's blog post, but the settings he mentions were already enabled.

Obviously, I can't simply upgrade to a 2008 box, nor do I want to downgrade my software back to < 4.0 - any other ideas?

© Stack Overflow or respective owner

Related posts about .net-4.0

Related posts about asp.net-mvc-2