<requiredRuntime> Element


Specifies that the application supports only version 1.0 of the common language runtime.


version="runtime version"  

The following sections describe attributes, child elements, and parent elements.


versionOptional attribute.

A string value that specifies the version of the .NET Framework that this application supports. The string value must match the directory name found under the .NET Framework installation root. The contents of the string value are not parsed.
safemodeOptional attribute.

Specifies whether the runtime startup code searches the registry to determine the runtime version.
falseThe runtime startup code looks in the registry. This is the default value.
trueThe runtime startup code does not look in the registry.

Child Elements


Parent Elements

configurationThe root element in every configuration file used by the common language runtime and .NET Framework applications.
startupContains the <requiredRuntime> element.

Applications built to support only version 1.0 of the runtime must use the <requiredRuntime> element. Applications built using version 1.1 or later of the runtime must use the <supportedRuntime> element.

System_CAPS_ICON_note.jpg Note

If you use the CorBindToRuntimeByCfg function to specify the configuration file, you must use the <requiredRuntime> element for all versions of the runtime. The <supportedRuntime> element is ignored when you use CorBindToRuntimeByCfg.

The version attribute string must match the installation folder name for the specified version of the .NET Framework. This string is not interpreted. If the runtime startup code does not find a matching folder, the runtime is not loaded; the startup code shows an error message and quits.

System_CAPS_ICON_note.jpg Note

The startup code for an application that is hosted in Microsoft Internet Explorer ignores the <requiredRuntime> element.

The following example shows how to specify the runtime version in a configuration file.

      <requiredRuntime version="v1.0.3705" safemode="true"/>  

Startup Settings Schema
Configuration File Schema
<PaveOver> Specifying Which Runtime Version to Use