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?
The 'targetFramework' attribute in the element of the Web. config file is used only to target version 4.0 and later of the . NET Framework (for example, ''). After an upgrade to the WhatsUp Gold server, I cannot load the Web Console.
When you target a framework in an app or library, you're specifying the set of APIs that you'd like to make available to the app or library. You specify the target framework in your project file using a target framework moniker (TFM). An app or library can target a version of .
Quote from the doc:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With