Breaking Changes Related to .NET 4.5.2

Author:JonK
Last Updated:March 08, 2016 3:42 PM

The HTML Tag

Visual Studio won't do this for you automatically, but in the new framework version there is a new class to specifcally represent the HTML tag.

In the previous version, your HTML tag would have been a System.Web.UI.HtmlControls.HtmlGenericControl 

In the new version it needs to be a System.Web.UI.HtmlControls.HtmlElement

 

The IFRAME Tag

Same scoop as above. 

In the previous version, an IFRAME tag would have been a System.Web.UI.HtmlControls.HtmlGenericControl 

In the new version it needs to be a System.Web.UI.HtmlControls.HtmlIframe

 

*.config

Not so much a "breaking change", but something to be aware of as it affects any overrides to web.confg

The new framework version requires changes to config files.

app.config

Previous versions specified the supported runtime using:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

In the new version, it is specified using:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>

web.config

Similarly, the compilation/debug configuration element needs to specify the target framework. 

Previous versions specified as:

<compilation defaultLanguage="c#" debug="true" targetFramework="4.0"/>

In the new version, it is specified as:

<compilation defaultLanguage="c#" debug="true" targetFramework="4.5.2"/>

 

top