In my ASP.Net 4.0 web.config I had the following attribute:
<compilation targetFramework="4.0">
If I remove the targetFramework attribute, everything appears to carry on as normal. Under what circumstances does this attribute help me?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Specifies the version of the .NET
Framework that the Web site targets.The default is Null.
If this attribute is omitted, the
target version is determined by other
settings in the Web.config file and by
the IIS application pool that the Web
site is associated with. For more
information, see
CompilationSection.TargetFramework and
.NET Framework Multi-Targeting for
ASP.NET Web Projects.
So basically if your application pool in IIS targets ASP.NET 4.0 and you omit this attribute nothing happens => your site still uses .NET 4.0
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0