<supportedRuntime> Element
Specifies which versions of the common language runtime the application supports. This element should be used by all applications built with version 1.1 or later of the .NET Framework.
<supportedRuntime>
<supportedRuntime version="runtime version" sku="sku id"/>
|
Attribute |
Description |
||
|---|---|---|---|
|
version |
Optional attribute. A string value that specifies the version of the common language runtime (CLR) that this application supports. The first three versions of the CLR are specified by "v1.0.3705", "v1.1.4322", and "v2.0.50727". Beginning with the .NET Framework 4, only the major and minor version numbers are required (that is, "v4.0" instead of "v4.0.30319"). The shorter string is recommended.
|
||
|
sku |
Optional attribute. A string value that specifies the SKU that runs the application. |
If the <supportedRuntime> element is not present in the application configuration file, the version of the runtime used to build the application is used.
The <supportedRuntime> element should be used by all applications built using version 1.1 or later of the runtime. Applications built to support only version 1.0 of the runtime must use the <requiredRuntime> element.
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. |
When multiple versions of the runtime are supported, the first element should specify the most preferred version of the runtime, and the last element should specify the least preferred version.
Note
|
|---|
|
If your application uses legacy activation paths, such as the CorBindToRuntimeEx function, and you want those paths to activate version 4 of the CLR instead of an earlier version, or if your application is built with the .NET Framework 4 but has a dependency on a mixed-mode assembly built with an earlier version of the .NET Framework, it is not sufficient to specify the .NET Framework 4 in the list of supported runtimes. In addition, in the <startup> element in your configuration file, you must set the useLegacyV2RuntimeActivationPolicy attribute to true. However, setting this attribute to true means that all components built with earlier versions of the .NET Framework are run using the .NET Framework 4 instead of the runtimes they were built with. |
The following table shows which installed versions of the .NET Framework 4 an application will run on, for different values of the sku attribute, when the version attribute is v4.0 or v4.0.30319. The table includes all platform updates (PU) to the .NET Framework 4 as of publication; you can assume that any future platform updates will follow the same pattern. We recommend that you test applications with all the .NET Framework versions that they can run on.
|
Value of sku attribute |
4.0 Client |
4.0 Full |
4.0 Client + PU 1 |
4.0 Full + PU 1 |
4.0 Client + PU 2 |
4.0 Full + PU 2 |
4.0 Client + PU 3 |
4.0 Full + PU 3 |
4.5 |
|---|---|---|---|---|---|---|---|---|---|
|
.NETFramework,Version=v4.0,Profile=Client |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
|
.NETFramework,Version=v4.0 |
|
Yes |
|
Yes |
|
Yes |
|
Yes |
Yes |
|
.NETFramework,Version=v4.0.1,Profile=Client |
|
|
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
|
.NETFramework,Version=v4.0.1 |
|
|
|
Yes |
|
Yes |
|
Yes |
Yes |
|
.NETFramework,Version=v4.0.2,Profile=Client |
|
|
|
|
Yes |
Yes |
Yes |
Yes |
Yes |
|
.NETFramework,Version=v4.0.2 |
|
|
|
|
|
Yes |
|
Yes |
Yes |
|
.NETFramework,Version=v4.0.3,Profile=Client |
|
|
|
|
|
|
Yes |
Yes |
Yes |
|
.NETFramework,Version=v4.0.3 |
|
|
|
|
|
|
|
Yes |
Yes |
|
.NETFramework,Version=v4.5 |
|
|
|
|
|
|
|
|
Yes |
Note