Compartir a través de


<requiredRuntime> Element

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

<configuration>
   <startup>
      <requiredRuntime>

<requiredRuntime 
   version="runtime version"
   safemode="true|false"/>

Optional Attributes

Attribute Description
version 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.
safemode Specifies whether the runtime startup code searches the registry to determine the runtime version. Specify one of the following values:
true
Does not look in the registry.
false
Looks in the registry. This is the default value.

Remarks

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.

Note   The startup code for an application hosted in Microsoft Internet Explorer ignores the <requiredRuntimed> element.

Example

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

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

Configuration File

This element can be used in the application configuration file.

See Also

Startup Settings Schema | Configuration File Schema | Specifying Which Runtime Version to Use