Here is the install which works and compiles great prior to .net 4.5 framework install.
.net 4.0 framework installed, ASP.NET web site which is targeting .net 3.5 in the build preferences and has all the "start up" and "legacy" entries in the web.config as well as in IIS runs in the .net 2.0 classic app pool. When build is initialed it builds fine since it is not compiled against .net 4.0 compiler which we all know is much stricter. Again it compiles with no issues.
Enter .net 4.5 framework install (with no changes what so ever done to the project) is fails to compile since it tries to compile against .net 4.0 and up. All the web.config entries are there the app pool is again set to .net 2.0 classic and it still compiles for .net 4.0. I know because the errors I get are identical of those I was getting when I set the app pool to work on .net 4.0 prior the .net 4.5 install.
So how can I force the VS2010 and the compiler to target .net 3.5 and not .net 4.0 when I have all the web.config suggested by MS entries as well as the app pool is set to 2.0?
Thanks in advance.
PS. What I mean by web.config legacy & startup:
Changing this section to v2.0 or any other version/combination and even removing the whole startup section makes no difference.
I also have the default 3.5 section:
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=3.5.30729.1, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
After uninstalling .net 4.5 and then installing .net 4.0 without any changes to the web.config ... the project compiles just fine and I we get no errors what so ever. This exercise was done more than once and it is clear to us that there is something with the .net 4.5 install which changes how the VS2010 compiles.
10/10/2012 Update: Any framework combination with the web.config section bellow makes no difference.
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>