From a2de7eeabd5ee4a17733118e28dec5cba31120e0 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 28 Nov 2025 10:03:19 -0800 Subject: [PATCH] prevent tags from loc --- .../runtime/add-element-for-namedcaches.md | 132 ++++++------ .../alwaysflowimpersonationpolicy-element.md | 188 ++++++++-------- .../appcontextswitchoverrides-element.md | 6 +- .../appdomainmanagerassembly-element.md | 122 +++++------ .../runtime/appdomainmanagertype-element.md | 122 +++++------ .../appdomainresourcemonitoring-element.md | 120 +++++------ .../assemblybinding-element-for-runtime.md | 150 ++++++------- .../assemblyidentity-element-for-runtime.md | 202 +++++++++--------- .../runtime/bindingredirect-element.md | 136 ++++++------ .../bypasstrustedappstrongnames-element.md | 2 +- .../runtime/clear-element-for-namedcaches.md | 84 ++++---- .../file-schema/runtime/codebase-element.md | 6 +- .../runtime/compatsortnlsversion-element.md | 146 ++++++------- .../runtime/crst-disablespinwait-element.md | 102 ++++----- .../runtime/dependentassembly-element.md | 126 +++++------ .../runtime/developmentmode-element.md | 114 +++++----- .../disablecachingbindingfailures-element.md | 130 +++++------ .../disablecommitthreadstack-element.md | 118 +++++----- ...sablefusionupdatesfromadmanager-element.md | 128 +++++------ .../disablestackoverflowprobing-element.md | 6 +- .../enableampmparseadjustment-element.md | 144 ++++++------- .../runtime/enforcefipspolicy-element.md | 116 +++++----- .../file-schema/runtime/etwenable-element.md | 116 +++++----- ...ecounteruniquesharedmemoryreads-element.md | 132 ++++++------ .../gcallowverylargeobjects-element.md | 116 +++++----- .../runtime/gcconcurrent-element.md | 10 +- .../file-schema/runtime/gccpugroup-element.md | 2 +- .../runtime/gcheapaffinitizemask-element.md | 8 +- .../runtime/gcheapcount-element.md | 10 +- .../runtime/gcnoaffinitize-element.md | 8 +- .../file-schema/runtime/gcserver-element.md | 6 +- .../generatepublisherevidence-element.md | 2 +- .../file-schema/runtime/index.md | 4 +- ...ycorruptedstateexceptionspolicy-element.md | 132 ++++++------ .../legacyimpersonationpolicy-element.md | 202 +++++++++--------- .../runtime/loadfromremotesources-element.md | 2 +- .../memorycache-element-cache-settings.md | 158 +++++++------- .../namedcaches-element-cache-settings.md | 152 ++++++------- .../netfx40-legacysecuritypolicy-element.md | 4 +- .../netfx40-pinvokestackresilience-element.md | 2 +- ...comparergethashcode-longstrings-element.md | 4 +- ...efercominsteadofmanagedremoting-element.md | 124 +++++------ .../file-schema/runtime/probing-element.md | 98 ++++----- .../runtime/publisherpolicy-element.md | 140 ++++++------ .../runtime/qualifyassembly-element.md | 118 +++++----- .../relativebindforresources-element.md | 2 +- .../runtime/remove-element-for-namedcaches.md | 84 ++++---- .../file-schema/runtime/runtime-element.md | 2 +- .../shadowcopyverifybytimestamp-element.md | 112 +++++----- .../runtime/supportportability-element.md | 130 +++++------ ...-runtime-caching-element-cache-settings.md | 98 ++++----- .../runtime/thread-useallcpugroups-element.md | 6 +- .../throwunobservedtaskexceptions-element.md | 136 ++++++------ .../timespan-legacyformatmode-element.md | 2 +- .../runtime/uselegacyjit-element.md | 126 +++++------ ...serandomizedstringhashalgorithm-element.md | 156 +++++++------- .../usesmallinternalthreadstacks-element.md | 120 +++++------ 57 files changed, 2462 insertions(+), 2462 deletions(-) diff --git a/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md b/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md index 8ed72e12f166f..bf041c9f788ab 100644 --- a/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md +++ b/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md @@ -2,83 +2,83 @@ description: "Learn more about: Element for " title: " Element for " ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "add element for " - " element for " ms.assetid: ce2a63a8-c829-4742-a6ea-72ee5d89f169 --- -# \ Element for \ +# `` Element for \ + +Adds a `namedCache` entry to the `namedCaches` collection for a memory cache. -Adds a `namedCache` entry to the `namedCaches` collection for a memory cache. - [**\**](../configuration-element.md)\   [**\**](system-runtime-caching-element-cache-settings.md)\     [**\**](memorycache-element-cache-settings.md)\       [**\**](namedcaches-element-cache-settings.md)\ -        **\** - -## Syntax - -```xml - - - - -``` - -## Type - - `None` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|-|-| -|`CacheMemoryLimitMegabytes`|An integer value that specifies the maximum allowed size (in megabytes) that an instance of a can grow to. The default value is 0, which means that the class's autosizing heuristics are used by default.| -|`Name`|The name of the cache.| -|`PhysicalMemoryLimitPercentage`|An integer value between 0 and 100 that specifies the maximum percentage of physically installed computer memory that can be consumed by the cache. The default value is 0, which means that the class's autosizing heuristics are used by default.| -|`PollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. This value is entered in "HH:MM:SS" format.| - -### Child Elements - - `None` - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the named instances.| - -## Remarks - - The `add` element adds an entry to the `namedCaches` collection for a memory cache. You can use the [clear](clear-element-for-namedcaches.md) element before you use the `add` element to be certain that there are no other named caches in the collection. This element can be used in the machine.config file and in the Web.config file. - -## Example - - The following example shows how to define settings for the default `namedCache` entry to the `namedCaches` collection for a memory cache. - -```xml - - - - - +        **\** + +## Syntax + +```xml + + + + +``` + +## Type + + `None` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|-|-| +|`CacheMemoryLimitMegabytes`|An integer value that specifies the maximum allowed size (in megabytes) that an instance of a can grow to. The default value is 0, which means that the class's autosizing heuristics are used by default.| +|`Name`|The name of the cache.| +|`PhysicalMemoryLimitPercentage`|An integer value between 0 and 100 that specifies the maximum percentage of physically installed computer memory that can be consumed by the cache. The default value is 0, which means that the class's autosizing heuristics are used by default.| +|`PollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. This value is entered in "HH:MM:SS" format.| + +### Child Elements + + `None` + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the named instances.| + +## Remarks + + The `add` element adds an entry to the `namedCaches` collection for a memory cache. You can use the [clear](clear-element-for-namedcaches.md) element before you use the `add` element to be certain that there are no other named caches in the collection. This element can be used in the machine.config file and in the Web.config file. + +## Example + + The following example shows how to define settings for the default `namedCache` entry to the `namedCaches` collection for a memory cache. + +```xml + + + + + - - - - - -``` - + physicalMemoryPercentage="0" + pollingInterval="00:02:00" /> + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element (Cache Settings)](namedcaches-element-cache-settings.md) +- [`` Element (Cache Settings)](namedcaches-element-cache-settings.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md index 711af4e018fa0..9a09b18443dca 100644 --- a/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md @@ -2,114 +2,114 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/alwaysFlowImpersonationPolicy" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#alwaysFlowImpersonationPolicy" -helpviewer_keywords: +helpviewer_keywords: - "alwaysFlowImpersonationPolicy element" - " element" ms.assetid: ee622801-9e46-470b-85ab-88c4b1dd2ee1 --- -# \ Element +# `` Element + +Specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed. -Specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     **\** - -## Syntax - -```xml + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Indicates whether the Windows identity flows across asynchronous points.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`false`|The Windows identity does not flow across asynchronous points, unless the impersonation is performed through managed methods such as . This is the default.| -|`true`|The Windows identity always flows across asynchronous points, regardless of how impersonation was performed.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - In the .NET Framework versions 1.0 and 1.1, the Windows identity does not flow across asynchronous points. In .NET Framework version 2.0, there is an object that contains information about the currently executing thread, and flows it across asynchronous points within an application domain. The also flows as part of the information that flows across the asynchronous points, provided the impersonation was achieved using managed methods such as and not through other means such as platform invoke to native methods. This element is used to specify that the Windows identity does flow across asynchronous points, regardless of how the impersonation was achieved. - - You can alter this default behavior in two other ways: - -1. In managed code on a per-thread basis. - - You can suppress the flow on a per-thread basis by modifying the and settings by using the , , or method. - -2. In the call to the unmanaged hosting interface to load the common language runtime (CLR). - - If an unmanaged hosting interface (instead of a simple managed executable) is used to load the CLR, you can specify a special flag in the call to the [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) function. To enable the compatibility mode for the entire process, set the `flags` parameter for [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) to `STARTUP_ALWAYSFLOW_IMPERSONATION`. - -## Configuration File - - In a .NET Framework application, this element can be used only in the application configuration file. - - For an ASP.NET application, the impersonation flow can be configured in the aspnet.config file found in the \\Microsoft.NET\Framework\vx.x.xxxx directory. - - ASP.NET by default disables the impersonation flow in the aspnet.config file by using the following configuration settings: - + enabled="true|false"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Indicates whether the Windows identity flows across asynchronous points.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`false`|The Windows identity does not flow across asynchronous points, unless the impersonation is performed through managed methods such as . This is the default.| +|`true`|The Windows identity always flows across asynchronous points, regardless of how impersonation was performed.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + In the .NET Framework versions 1.0 and 1.1, the Windows identity does not flow across asynchronous points. In .NET Framework version 2.0, there is an object that contains information about the currently executing thread, and flows it across asynchronous points within an application domain. The also flows as part of the information that flows across the asynchronous points, provided the impersonation was achieved using managed methods such as and not through other means such as platform invoke to native methods. This element is used to specify that the Windows identity does flow across asynchronous points, regardless of how the impersonation was achieved. + + You can alter this default behavior in two other ways: + +1. In managed code on a per-thread basis. + + You can suppress the flow on a per-thread basis by modifying the and settings by using the , , or method. + +2. In the call to the unmanaged hosting interface to load the common language runtime (CLR). + + If an unmanaged hosting interface (instead of a simple managed executable) is used to load the CLR, you can specify a special flag in the call to the [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) function. To enable the compatibility mode for the entire process, set the `flags` parameter for [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) to `STARTUP_ALWAYSFLOW_IMPERSONATION`. + +## Configuration File + + In a .NET Framework application, this element can be used only in the application configuration file. + + For an ASP.NET application, the impersonation flow can be configured in the aspnet.config file found in the \\Microsoft.NET\Framework\vx.x.xxxx directory. + + ASP.NET by default disables the impersonation flow in the aspnet.config file by using the following configuration settings: + ```xml - - - - - - -``` - - In ASP.NET, if you want to allow the flow of impersonation instead, you must explicitly use the following configuration settings: - -```xml - - - - - - -``` - -## Example - - The following example shows how to specify that the Windows identity flows across asynchronous points, even when the impersonation is achieved through means other than managed methods. - -```xml - - - - - -``` - + + + + + + +``` + + In ASP.NET, if you want to allow the flow of impersonation instead, you must explicitly use the following configuration settings: + +```xml + + + + + + +``` + +## Example + + The following example shows how to specify that the Windows identity flows across asynchronous points, even when the impersonation is achieved through means other than managed methods. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) - [Runtime Settings Schema](index.md) - [Configuration File Schema](../index.md) -- [\ Element](legacyimpersonationpolicy-element.md) +- [`` Element](legacyimpersonationpolicy-element.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md b/docs/framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md index 25658365fbae8..88788e1b06c94 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appcontextswitchoverrides-element.md @@ -9,7 +9,7 @@ helpviewer_keywords: - "configuration" ms.assetid: 4ce07f47-7ddb-4d91-b067-501bd8b88752 --- -# \ element +# `` element Defines one or more switches used by the class to provide an opt-out mechanism for new functionality. @@ -182,5 +182,5 @@ The following example uses the `` element to add two settings to the ` -- [\ Element](runtime-element.md) -- [\ Element](../configuration-element.md) +- [`` Element](runtime-element.md) +- [`` Element](../configuration-element.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md index 249c4d3f2bd26..c5c8f224ce537 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md @@ -2,81 +2,81 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element" - "appDomainManagerAssembly element" ms.assetid: c7c56e39-a700-44f5-b94e-411bfce339d9 --- -# \ Element +# `` Element + +Specifies the assembly that provides the application domain manager for the default application domain in the process. -Specifies the assembly that provides the application domain manager for the default application domain in the process. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`value`|Required attribute. Specifies the display name of the assembly that provides the application domain manager for the default application domain in the process.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - To specify the type of the application domain manager, you must specify both this element and the [\](appdomainmanagertype-element.md) element. If either of these elements is not specified, the other is ignored. - - When the default application domain is loaded, is thrown if the specified assembly does not exist or if the assembly does not contain the type specified by the [\](appdomainmanagertype-element.md) element; and the process fails to start. If the assembly is found but the version information does not match, a is thrown. - - When you specify the application domain manager type for the default application domain, other application domains created from the default application domain inherit the application domain manager type. Use the and properties to specify a different application domain manager type for a new application domain. - - Specifying the application domain manager type requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown. - - For the format of the assembly display name, see the property. - - This configuration element is available only in the .NET Framework 4 and later. - -## Example - - The following example shows how to specify that the application domain manager for the default application domain of a process is the `MyMgr` type in the `AdMgrExample` assembly. - -```xml - - - + value="assembly display name" /> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`value`|Required attribute. Specifies the display name of the assembly that provides the application domain manager for the default application domain in the process.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + To specify the type of the application domain manager, you must specify both this element and the [\](appdomainmanagertype-element.md) element. If either of these elements is not specified, the other is ignored. + + When the default application domain is loaded, is thrown if the specified assembly does not exist or if the assembly does not contain the type specified by the [\](appdomainmanagertype-element.md) element; and the process fails to start. If the assembly is found but the version information does not match, a is thrown. + + When you specify the application domain manager type for the default application domain, other application domains created from the default application domain inherit the application domain manager type. Use the and properties to specify a different application domain manager type for a new application domain. + + Specifying the application domain manager type requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown. + + For the format of the assembly display name, see the property. + + This configuration element is available only in the .NET Framework 4 and later. + +## Example + + The following example shows how to specify that the application domain manager for the default application domain of a process is the `MyMgr` type in the `AdMgrExample` assembly. + +```xml + + + - - -``` - + value="AdMgrExample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6856bccf150f00b3" /> + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) - - -- [\ Element](appdomainmanagertype-element.md) +- [`` Element](appdomainmanagertype-element.md) - [Runtime Settings Schema](index.md) - [Configuration File Schema](../index.md) - [SetAppDomainManagerType Method](../../../unmanaged-api/hosting/iclrcontrol-setappdomainmanagertype-method.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md index bcf5f8c97823c..7029183b0c885 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md @@ -2,81 +2,81 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "appDomainManagerType element" - " element" ms.assetid: ae8d5a7e-e7f7-47f7-98d9-455cc243a322 --- -# \ Element +# `` Element + +Specifies the type that serves as the application domain manager for the default application domain. -Specifies the type that serves as the application domain manager for the default application domain. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`value`|Required attribute. Specifies the name of the type, including the namespace, that serves as the application domain manager for the default application domain in the process.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - To specify the type of the application domain manager, you must specify both this element and the [\](appdomainmanagerassembly-element.md) element. If either of these elements is not specified, the other is ignored. - - When the default application domain is loaded, is thrown if the specified type does not exist in the assembly that is specified by the [\](appdomainmanagerassembly-element.md) element; and the process fails to start. - - When you specify the application domain manager type for the default application domain, other application domains created from the default application domain inherit the application domain manager type. Use the and properties to specify a different application domain manager type for a new application domain. - - Specifying the application domain manager type requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown. - - The format of the type and namespace is the same format that is used for the property. - - This configuration element is available only in the .NET Framework 4 and later. - -## Example - - The following example shows how to specify that the application domain manager for the default application domain of a process is the `MyMgr` type in the `AdMgrExample` assembly. - -```xml - - - + value="type name" /> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`value`|Required attribute. Specifies the name of the type, including the namespace, that serves as the application domain manager for the default application domain in the process.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + To specify the type of the application domain manager, you must specify both this element and the [\](appdomainmanagerassembly-element.md) element. If either of these elements is not specified, the other is ignored. + + When the default application domain is loaded, is thrown if the specified type does not exist in the assembly that is specified by the [\](appdomainmanagerassembly-element.md) element; and the process fails to start. + + When you specify the application domain manager type for the default application domain, other application domains created from the default application domain inherit the application domain manager type. Use the and properties to specify a different application domain manager type for a new application domain. + + Specifying the application domain manager type requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown. + + The format of the type and namespace is the same format that is used for the property. + + This configuration element is available only in the .NET Framework 4 and later. + +## Example + + The following example shows how to specify that the application domain manager for the default application domain of a process is the `MyMgr` type in the `AdMgrExample` assembly. + +```xml + + + - - -``` - + value="AdMgrExample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6856bccf150f00b3" /> + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) - - -- [\ Element](appdomainmanagerassembly-element.md) +- [`` Element](appdomainmanagerassembly-element.md) - [Runtime Settings Schema](index.md) - [Configuration File Schema](../index.md) - [SetAppDomainManagerType Method](../../../unmanaged-api/hosting/iclrcontrol-setappdomainmanagertype-method.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md b/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md index 4c811bca4251b..5199d32afb123 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md @@ -2,74 +2,74 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "appDomainResourceMonitoring element" - " element" ms.assetid: 02119ab6-1e91-448e-97ad-e7b2e5c4bbbd --- -# \ Element +# `` Element + +Instructs the runtime to collect statistics on all application domains in the process for the life of the process. -Instructs the runtime to collect statistics on all application domains in the process for the life of the process. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies whether the runtime collects statistics for application domain resource monitoring.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`true`|Statistics for application domain resource monitoring are collected.| -|`false`|Statistics for application domain resource monitoring are not collected.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Application domain resource monitoring is available through the managed application domain class, the hosting [ICLRAppDomainResourceMonitor](../../../unmanaged-api/hosting/iclrappdomainresourcemonitor-interface.md) interface, and event tracing for Windows (ETW). When monitoring is enabled, statistics are collected for all application domains in the process for the life of the process. - - To enable monitoring from managed code, use the property. - - This configuration element is available only in the .NET Framework 4 and later. - -## Example - - The following example shows how to enable application domain resource monitoring. - -```xml - - - - - -``` - + enabled="true|false"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies whether the runtime collects statistics for application domain resource monitoring.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`true`|Statistics for application domain resource monitoring are collected.| +|`false`|Statistics for application domain resource monitoring are not collected.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Application domain resource monitoring is available through the managed application domain class, the hosting [ICLRAppDomainResourceMonitor](../../../unmanaged-api/hosting/iclrappdomainresourcemonitor-interface.md) interface, and event tracing for Windows (ETW). When monitoring is enabled, statistics are collected for all application domains in the process for the life of the process. + + To enable monitoring from managed code, use the property. + + This configuration element is available only in the .NET Framework 4 and later. + +## Example + + The following example shows how to enable application domain resource monitoring. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md b/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md index 2d14b0a9bd287..e3170b36f1e1a 100644 --- a/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md +++ b/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md @@ -2,92 +2,92 @@ description: "Learn more about: Element for " title: " Element for " ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding" -helpviewer_keywords: +helpviewer_keywords: - " element" - "assemblyBinding element" - "container tags, element" ms.assetid: 964cbb35-ab49-4498-8471-209689e5dada --- -# \ Element for \ +# `` Element for \ + +Contains information about assembly version redirection and the locations of assemblies. -Contains information about assembly version redirection and the locations of assemblies. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|**xmlns**|Required attribute.

Specifies the XML namespace required for assembly binding. Use the string "urn:schemas-microsoft-com:asm.v1" as the value.| -|**appliesTo**|Specifies the runtime version the .NET Framework assembly redirection applies to. This optional attribute uses a .NET Framework version number to indicate what version it applies to. If no **appliesTo** attribute is specified, the **\** element applies to all versions of the .NET Framework. The **appliesTo** attribute was introduced in .NET Framework version 1.1; it is ignored by .NET Framework version 1.0. This means that all **\** elements are applied when using .NET Framework version 1.0, even if an **appliesTo** attribute is specified.| - -### Child Elements - -|Element|Description| -|-------------|-----------------| -|[\](dependentassembly-element.md)|Encapsulates binding policy and assembly location for an assembly. Use one **\** tag for each assembly.| -|[\](probing-element.md)|Specifies subdirectories the common language runtime searches when loading assemblies.| -|[\](publisherpolicy-element.md)|Specifies whether the runtime applies publisher policy.| -|[\](qualifyassembly-element.md)|Specifies the full name of the assembly that should be dynamically loaded when a partial name is used.| - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Example - - The following example shows how to redirect one assembly version to another and provide a codebase. - -```xml - - - - - - - - - - - -``` - - The following example shows how to use the **appliesTo** attribute to redirect binding of a .NET Framework assembly. - -```xml - - + xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705"> + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|**xmlns**|Required attribute.

Specifies the XML namespace required for assembly binding. Use the string "urn:schemas-microsoft-com:asm.v1" as the value.| +|**appliesTo**|Specifies the runtime version the .NET Framework assembly redirection applies to. This optional attribute uses a .NET Framework version number to indicate what version it applies to. If no `appliesTo` attribute is specified, the `` element applies to all versions of the .NET Framework. The `appliesTo` attribute was introduced in .NET Framework version 1.1; it is ignored by .NET Framework version 1.0. This means that all `` elements are applied when using .NET Framework version 1.0, even if an `appliesTo` attribute is specified.| + +### Child Elements + +|Element|Description| +|-------------|-----------------| +|[\](dependentassembly-element.md)|Encapsulates binding policy and assembly location for an assembly. Use one `` tag for each assembly.| +|[\](probing-element.md)|Specifies subdirectories the common language runtime searches when loading assemblies.| +|[\](publisherpolicy-element.md)|Specifies whether the runtime applies publisher policy.| +|[\](qualifyassembly-element.md)|Specifies the full name of the assembly that should be dynamically loaded when a partial name is used.| + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Example + + The following example shows how to redirect one assembly version to another and provide a codebase. + +```xml + + + + + + + + + + + +``` + + The following example shows how to use the `appliesTo` attribute to redirect binding of a .NET Framework assembly. + +```xml + + - - - - - -``` - + + + + +
+``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md b/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md index 5462ac1c8a741..9834ce62d4b77 100644 --- a/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md +++ b/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md @@ -2,123 +2,123 @@ description: "Learn more about: Element for " title: " Element for " ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/dependentAssembly/assemblyIdentity" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#assemblyIdentity" -helpviewer_keywords: +helpviewer_keywords: - " element" - "container tags, element" - "assemblyIdentity element" ms.assetid: cea4d187-6398-4da4-af09-c1abc6a349c1 --- -# \ Element for \ +# `` Element for \ + +Contains identifying information about the assembly. -Contains identifying information about the assembly. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\       [**\**](dependentassembly-element.md)\ -        **\** - -## Syntax - -```xml +        **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`name`|Required attribute.

The name of the assembly| -|`culture`|Optional attribute.

A string that specifies the language and country/region of the assembly.| -|`publicKeyToken`|Optional attribute.

A hexadecimal value that specifies the strong name of the assembly.| -|`processorArchitecture`|Optional attribute.

One of the values "x86", "amd64", "msil", or "ia64", specifying the processor architecture for an assembly that contains processor-specific code. The values are not case-sensitive. If the attribute is assigned any other value, the entire `` element is ignored. See .| - -## processorArchitecture Attribute - -|Value|Description| -|-----------|-----------------| -|`amd64`|AMD x86-64 architecture only.| -|`ia64`|Intel Itanium architecture only.| -|`msil`|Neutral with respect to processor and bits-per-word.| -|`x86`|A 32-bit x86 processor, either native or in the Windows on Windows (WOW) environment on a 64-bit platform.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`dependentAssembly`|Encapsulates binding policy and assembly location for each assembly. Use one `` element for each assembly.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Every **\** element must have one **\** child element. - - If the `processorArchitecture` attribute is present, the `` element applies only to the assembly with the corresponding processor architecture. If the `processorArchitecture` attribute is not present, the `` element can apply to an assembly with any processor architecture. - - The following example shows a configuration file for two assemblies with the same name that target two different processor architectures, and whose versions have not been maintained in synch. When the application executes on the x86 platform, the first `` element applies and the other is ignored. If the application executes on a platform other than x86 or ia64, both are ignored. - -```xml - - - - - +name="assembly name" +publicKeyToken="public key token" +culture="assembly culture"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`name`|Required attribute.

The name of the assembly| +|`culture`|Optional attribute.

A string that specifies the language and country/region of the assembly.| +|`publicKeyToken`|Optional attribute.

A hexadecimal value that specifies the strong name of the assembly.| +|`processorArchitecture`|Optional attribute.

One of the values "x86", "amd64", "msil", or "ia64", specifying the processor architecture for an assembly that contains processor-specific code. The values are not case-sensitive. If the attribute is assigned any other value, the entire `` element is ignored. See .| + +## processorArchitecture Attribute + +|Value|Description| +|-----------|-----------------| +|`amd64`|AMD x86-64 architecture only.| +|`ia64`|Intel Itanium architecture only.| +|`msil`|Neutral with respect to processor and bits-per-word.| +|`x86`|A 32-bit x86 processor, either native or in the Windows on Windows (WOW) environment on a 64-bit platform.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`dependentAssembly`|Encapsulates binding policy and assembly location for each assembly. Use one `` element for each assembly.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Every `` element must have one `` child element. + + If the `processorArchitecture` attribute is present, the `` element applies only to the assembly with the corresponding processor architecture. If the `processorArchitecture` attribute is not present, the `` element can apply to an assembly with any processor architecture. + + The following example shows a configuration file for two assemblies with the same name that target two different processor architectures, and whose versions have not been maintained in synch. When the application executes on the x86 platform, the first `` element applies and the other is ignored. If the application executes on a platform other than x86 or ia64, both are ignored. + +```xml + + + + + - - - + + + + processorArchitecture="ia64" /> - - - - -``` - - If a configuration file contains an `` element with no `processorArchitecture` attribute, and does not contain an element that matches the platform, the element without the `processorArchitecture` attribute is used. - -## Example - - The following example shows how to provide information about an assembly. - -```xml - - - - - - - - - - -``` - + newVersion="2.0.0.0" /> + +
+
+
+``` + + If a configuration file contains an `` element with no `processorArchitecture` attribute, and does not contain an element that matches the platform, the element without the `processorArchitecture` attribute is used. + +## Example + + The following example shows how to provide information about an assembly. + +```xml + + + + + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md b/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md index a750ddbcf4978..c7dc795d95738 100644 --- a/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md @@ -2,87 +2,87 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/dependentAssembly/bindingRedirect" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#bindingRedirect" -helpviewer_keywords: +helpviewer_keywords: - " element" - "container tags, element" - "bindingRedirect element" ms.assetid: 67784ecd-9663-434e-bd6a-26975e447ac0 --- -# \ Element +# `` Element + +Redirects one assembly version to another. -Redirects one assembly version to another. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\       [**\**](dependentassembly-element.md)\ -        **\** - -## Syntax - -```xml +        **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`oldVersion`|Required attribute.

Specifies the version of the assembly that was originally requested. The format of an assembly version number is *major.minor.build.revision*. Valid values for each part of this version number are 0 to 65535.

You can also specify a range of versions in the following format:

*n.n.n.n - n.n.n.n*| -|`newVersion`|Required attribute.

Specifies the version of the assembly to use instead of the originally requested version in the format: *n.n.n.n*

This value can specify an earlier version than `oldVersion`.| - -### Child Elements - -|Element|Description| -|-------------|-----------------| -|None|| - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`dependentAssembly`|Encapsulates binding policy and assembly location for each assembly. Use one dependentAssembly element for each assembly.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - When you build a .NET Framework application against a strong-named assembly, the application uses that version of the assembly at run time by default, even if a new version is available. However, you can configure the application to run against a newer version of the assembly. For details on how the runtime uses these files to determine which assembly version to use, see [How the Runtime Locates Assemblies](../../../deployment/how-the-runtime-locates-assemblies.md). - - You can redirect more than one assembly version by including multiple `bindingRedirect` elements in a `dependentAssembly` element. You can also redirect from a newer version to an older version of the assembly. - - Explicit assembly binding redirection in an application configuration file requires a security permission. This applies to redirection of .NET Framework assemblies and assemblies from third parties. The permission is granted by setting the flag on the . For more information, see [Assembly Binding Redirection Security Permission](../../assembly-binding-redirection-security-permission.md). - -## Example - - The following example shows how to redirect one assembly version to another. - -```xml - - - - - - - - - - -``` - +oldVersion="existing assembly version" +newVersion="new assembly version"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`oldVersion`|Required attribute.

Specifies the version of the assembly that was originally requested. The format of an assembly version number is *major.minor.build.revision*. Valid values for each part of this version number are 0 to 65535.

You can also specify a range of versions in the following format:

*n.n.n.n - n.n.n.n*| +|`newVersion`|Required attribute.

Specifies the version of the assembly to use instead of the originally requested version in the format: *n.n.n.n*

This value can specify an earlier version than `oldVersion`.| + +### Child Elements + +|Element|Description| +|-------------|-----------------| +|None|| + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`dependentAssembly`|Encapsulates binding policy and assembly location for each assembly. Use one dependentAssembly element for each assembly.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + When you build a .NET Framework application against a strong-named assembly, the application uses that version of the assembly at run time by default, even if a new version is available. However, you can configure the application to run against a newer version of the assembly. For details on how the runtime uses these files to determine which assembly version to use, see [How the Runtime Locates Assemblies](../../../deployment/how-the-runtime-locates-assemblies.md). + + You can redirect more than one assembly version by including multiple `bindingRedirect` elements in a `dependentAssembly` element. You can also redirect from a newer version to an older version of the assembly. + + Explicit assembly binding redirection in an application configuration file requires a security permission. This applies to redirection of .NET Framework assemblies and assemblies from third parties. The permission is granted by setting the flag on the . For more information, see [Assembly Binding Redirection Security Permission](../../assembly-binding-redirection-security-permission.md). + +## Example + + The following example shows how to redirect one assembly version to another. + +```xml + + + + + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/bypasstrustedappstrongnames-element.md b/docs/framework/configure-apps/file-schema/runtime/bypasstrustedappstrongnames-element.md index d0a30158d9f54..802587fdd271a 100644 --- a/docs/framework/configure-apps/file-schema/runtime/bypasstrustedappstrongnames-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/bypasstrustedappstrongnames-element.md @@ -9,7 +9,7 @@ helpviewer_keywords: - " element" ms.assetid: 71b2ebf6-3843-41e2-ad52-ffa5cd083a40 --- -# \ Element +# `` Element Specifies whether to bypass the validation of strong names on full-trust assemblies that are loaded into a full-trust . diff --git a/docs/framework/configure-apps/file-schema/runtime/clear-element-for-namedcaches.md b/docs/framework/configure-apps/file-schema/runtime/clear-element-for-namedcaches.md index 1481f214833dd..72869b941455d 100644 --- a/docs/framework/configure-apps/file-schema/runtime/clear-element-for-namedcaches.md +++ b/docs/framework/configure-apps/file-schema/runtime/clear-element-for-namedcaches.md @@ -2,57 +2,57 @@ description: "Learn more about: Element for " title: " Element for " ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element for " - "clear element for " ms.assetid: ea01a858-65da-4348-800f-5e3df59d4d79 --- -# \ Element for \ +# `` Element for \ + +Clears all `namedCache` entries in the `namedCaches` collection for a memory cache. -Clears all `namedCache` entries in the `namedCaches` collection for a memory cache. - [**\**](../configuration-element.md)\   [**\**](system-runtime-caching-element-cache-settings.md)\     [**\**](memorycache-element-cache-settings.md)\       [**\**](namedcaches-element-cache-settings.md)\ -        **\** - -## Syntax - -```xml - - - - -``` - -## Type - - `Type` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - - `None` - -### Child Elements - - `None` - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the named instances.| - -## Remarks - - The `clear` element clears all `namedCache` entries in the named cache collection for a memory cache. You can use the `clear` element before you use the `add` element to add a new named cache entry in order to be certain there are no other named caches in the collection. - +        **\** + +## Syntax + +```xml + + + + +``` + +## Type + + `Type` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + + `None` + +### Child Elements + + `None` + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the named instances.| + +## Remarks + + The `clear` element clears all `namedCache` entries in the named cache collection for a memory cache. You can use the `clear` element before you use the `add` element to add a new named cache entry in order to be certain there are no other named caches in the collection. + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element (Cache Settings)](namedcaches-element-cache-settings.md) +- [`` Element (Cache Settings)](namedcaches-element-cache-settings.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/codebase-element.md b/docs/framework/configure-apps/file-schema/runtime/codebase-element.md index 873770abdd510..e2fd79208c71e 100644 --- a/docs/framework/configure-apps/file-schema/runtime/codebase-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/codebase-element.md @@ -12,7 +12,7 @@ helpviewer_keywords: ms.assetid: d48a3983-2297-43ff-a14d-1f29d3995822 --- -# \ Element +# `` Element Specifies where the common language runtime can find an assembly. @@ -62,11 +62,11 @@ None. ## Remarks -For the runtime to use the **\** setting in a machine configuration file or publisher policy file, the file must also redirect the assembly version. Application configuration files can have a codebase setting without redirecting the assembly version. After determining which assembly version to use, the runtime applies the codebase setting from the file that determines the version. If no codebase is indicated, the runtime probes for the assembly in the usual way. +For the runtime to use the `` setting in a machine configuration file or publisher policy file, the file must also redirect the assembly version. Application configuration files can have a codebase setting without redirecting the assembly version. After determining which assembly version to use, the runtime applies the codebase setting from the file that determines the version. If no codebase is indicated, the runtime probes for the assembly in the usual way. If the assembly has a strong name, the codebase setting can be anywhere on the local intranet or the Internet. If the assembly is a private assembly, the codebase setting must be a path relative to the application's directory. -For assemblies without a strong name, version is ignored and the loader uses the first appearance of \ inside \. If there is an entry in the application configuration file that redirects binding to another assembly, the redirection will take precedence even if the assembly version doesn't match the binding request. +For assemblies without a strong name, version is ignored and the loader uses the first appearance of `` inside ``. If there is an entry in the application configuration file that redirects binding to another assembly, the redirection will take precedence even if the assembly version doesn't match the binding request. ## Example diff --git a/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md b/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md index 138b4a86038d3..3e454fef88a64 100644 --- a/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md @@ -2,95 +2,95 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -dev_langs: +dev_langs: - "csharp" - "vb" -helpviewer_keywords: +helpviewer_keywords: - " element" - "CompatSortNLSVersion element" ms.assetid: 782cc82e-83f7-404a-80b7-6d3061a8b6e3 --- -# \ Element +# `` Element + +Specifies that the runtime should use legacy sort orders when performing string comparisons. -Specifies that the runtime should use legacy sort orders when performing string comparisons. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies the locale ID whose sort order is to be used.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|4096|The locale ID that represents an alternate sort order. In this case, 4096 represents the sort order of the .NET Framework 3.5 and earlier versions.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about runtime initialization options.| - -## Remarks - - Because string comparison, sorting, and casing operations performed by the class in the .NET Framework 4 conform to the Unicode 5.1 standard, the results of string comparison methods such as and may differ from previous versions of the .NET Framework. If your application depends on legacy behavior, you can restore the string comparison and sorting rules used in the .NET Framework 3.5 and earlier versions by including the `` element in your application's configuration file. - + enabled="4096"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies the locale ID whose sort order is to be used.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|4096|The locale ID that represents an alternate sort order. In this case, 4096 represents the sort order of the .NET Framework 3.5 and earlier versions.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about runtime initialization options.| + +## Remarks + + Because string comparison, sorting, and casing operations performed by the class in the .NET Framework 4 conform to the Unicode 5.1 standard, the results of string comparison methods such as and may differ from previous versions of the .NET Framework. If your application depends on legacy behavior, you can restore the string comparison and sorting rules used in the .NET Framework 3.5 and earlier versions by including the `` element in your application's configuration file. + > [!IMPORTANT] -> Restoring legacy string comparison and sorting rules also requires the sort00001000.dll dynamic link library to be available on the local system. - - You can also use legacy string sorting and comparison rules in a specific application domain by passing the string "NetFx40_Legacy20SortingBehavior" to the method when you create the application domain. - -## Example - - The following example instantiates two objects and calls the method to compare them by using the conventions of the current culture. - +> Restoring legacy string comparison and sorting rules also requires the sort00001000.dll dynamic link library to be available on the local system. + + You can also use legacy string sorting and comparison rules in a specific application domain by passing the string "NetFx40_Legacy20SortingBehavior" to the method when you create the application domain. + +## Example + + The following example instantiates two objects and calls the method to compare them by using the conventions of the current culture. + [!code-csharp[String.BreakingChanges#1](../../../../../samples/snippets/csharp/VS_Snippets_CLR/string.breakingchanges/cs/example1.cs#1)] - [!code-vb[String.BreakingChanges#1](../../../../../samples/snippets/visualbasic/VS_Snippets_CLR/string.breakingchanges/vb/example1.vb#1)] - + [!code-vb[String.BreakingChanges#1](../../../../../samples/snippets/visualbasic/VS_Snippets_CLR/string.breakingchanges/vb/example1.vb#1)] + When you run the example on the .NET Framework 4, it displays the following output: - + ```console -sta follows a in the sort order. -``` - +sta follows a in the sort order. +``` + This is completely different from the output that is displayed when you run the example on the .NET Framework 3.5: - + ```console -sta equals a in the sort order. -``` - - However, if you add the following configuration file to the example's directory and then run the example on the .NET Framework 4, the output is identical to that produced by the example when it is run on .NET Framework 3.5. - -```xml - - - - - - -``` - +sta equals a in the sort order. +``` + + However, if you add the following configuration file to the example's directory and then run the example on the .NET Framework 4, the output is identical to that produced by the example when it is run on .NET Framework 3.5. + +```xml + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/crst-disablespinwait-element.md b/docs/framework/configure-apps/file-schema/runtime/crst-disablespinwait-element.md index b3043c57729ad..cf8093c847761 100644 --- a/docs/framework/configure-apps/file-schema/runtime/crst-disablespinwait-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/crst-disablespinwait-element.md @@ -2,65 +2,65 @@ description: "Learn more about: element" title: " element" ms.date: "04/18/2019" -f1_keywords: +f1_keywords: - "Crst_DisableSpinWait" -helpviewer_keywords: +helpviewer_keywords: - "Crst_DisableSpinWait element" --- -# \ element +# `` element + +Specifies whether to disable spin-waiting for a critical section when contended. -Specifies whether to disable spin-waiting for a critical section when contended. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - +    **\** + +## Syntax + +```xml + +``` + ## Attributes and Elements -The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|**enabled**|Specifies whether spin-waiting for critical sections when they are contended is disabled.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|1|Disable spin-waiting when a critical section cannot be acquired.| -|0|Do not disable spin-waiting when a critical section cannot be acquired. This is the default value.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about various runtime configuration settings.| - -## Example - -The following example disables spin-waiting in critical sections when contended. - -```xml - - - - - -``` - +The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|**enabled**|Specifies whether spin-waiting for critical sections when they are contended is disabled.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|1|Disable spin-waiting when a critical section cannot be acquired.| +|0|Do not disable spin-waiting when a critical section cannot be acquired. This is the default value.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about various runtime configuration settings.| + +## Example + +The following example disables spin-waiting in critical sections when contended. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md b/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md index 2e854fba34c9f..5172d8abdbc5c 100644 --- a/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md @@ -2,81 +2,81 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/dependentAssembly" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#dependentAssembly" -helpviewer_keywords: +helpviewer_keywords: - "container tags, element" - "dependentAssembly element" - " element" ms.assetid: 14e95627-dd79-4b82-ac85-e682aa3a31d8 --- -# \ Element +# `` Element + +Encapsulates binding policy and assembly location for each assembly. Use one `dependentAssembly` element for each assembly. -Encapsulates binding policy and assembly location for each assembly. Use one `dependentAssembly` element for each assembly. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\ -      **\** - -## Syntax - -```xml +      **\** + +## Syntax + +```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - - None. - -### Child Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyIdentity`|Contains identifying information about the assembly. This element must be included in each `dependentAssembly` element.| -|`codeBase`|Specifies where the runtime can find a shared assembly if it is not installed on the computer.| -|`bindingRedirect`|Redirects one assembly version to another.| -|`publisherPolicy`|Specifies whether the runtime applies publisher policy for this assembly.| - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Example - - The following example shows how to encapsulate assembly information for two assemblies. - -```xml - - - - - - - - - - - - - - -``` - + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + + None. + +### Child Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyIdentity`|Contains identifying information about the assembly. This element must be included in each `dependentAssembly` element.| +|`codeBase`|Specifies where the runtime can find a shared assembly if it is not installed on the computer.| +|`bindingRedirect`|Redirects one assembly version to another.| +|`publisherPolicy`|Specifies whether the runtime applies publisher policy for this assembly.| + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Example + + The following example shows how to encapsulate assembly information for two assemblies. + +```xml + + + + + + + + + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/developmentmode-element.md b/docs/framework/configure-apps/file-schema/runtime/developmentmode-element.md index 80e8272e38c06..e3ef5ecf250b3 100644 --- a/docs/framework/configure-apps/file-schema/runtime/developmentmode-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/developmentmode-element.md @@ -2,73 +2,73 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/developmentMode" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#developmentMode" -helpviewer_keywords: +helpviewer_keywords: - "developmentMode element" - "container tags, element" - " element" ms.assetid: 60e79a8c-415a-497d-be29-b9d0fd9bdee3 --- -# \ Element +# `` Element + +Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable. -Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|**developerInstallation**|Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable.| - -## developerInstallation Attribute - -|Value|Description| -|-----------|-----------------| -|**true**|Searches for assemblies in directories specified by the DEVPATH environment variable.| -|**false**|Does not search for assemblies in directories specified by the DEVPATH environment variable. This is the default| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Use this setting only at development time. The runtime does not check the versions on strong-named assemblies found in the DEVPATH. It simply uses the first assembly it finds. - -## Example - - The following example shows how to cause the runtime to search for assemblies in directories specified by the DEVPATH environment variable. - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|**developerInstallation**|Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable.| + +## developerInstallation Attribute + +|Value|Description| +|-----------|-----------------| +|**true**|Searches for assemblies in directories specified by the DEVPATH environment variable.| +|**false**|Does not search for assemblies in directories specified by the DEVPATH environment variable. This is the default| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Use this setting only at development time. The runtime does not check the versions on strong-named assemblies found in the DEVPATH. It simply uses the first assembly it finds. + +## Example + + The following example shows how to cause the runtime to search for assemblies in directories specified by the DEVPATH environment variable. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/disablecachingbindingfailures-element.md b/docs/framework/configure-apps/file-schema/runtime/disablecachingbindingfailures-element.md index 8ba66968c8a37..de1f87fe0dec2 100644 --- a/docs/framework/configure-apps/file-schema/runtime/disablecachingbindingfailures-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/disablecachingbindingfailures-element.md @@ -2,82 +2,82 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#disableCachingBindingFailures" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/disableCachingBindingFailures" -helpviewer_keywords: +helpviewer_keywords: - "assemblies [.NET Framework],caching binding failures" - "caching assembly binding failures" - " element" - "disableCachingBindingFailures element" ms.assetid: bf598873-83b7-48de-8955-00b0504fbad0 --- -# \ Element +# `` Element + +Specifies whether to disable the caching of binding failures that occur because the assembly was not found by probing. -Specifies whether to disable the caching of binding failures that occur because the assembly was not found by probing. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether to disable the caching of binding failures that occur because the assembly was not found by probing.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|0|Do not disable the caching of binding failures that occur because the assembly was not found by probing. This is the default binding behavior starting with .NET Framework version 2.0.| -|1|Disable the caching of binding failures that occur because the assembly was not found by probing. This setting reverts to the binding behavior of .NET Framework version 1.1.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Starting with .NET Framework version 2.0, the default behavior for loading assemblies is to cache all binding and loading failures. That is, if an attempt to load an assembly fails, subsequent requests to load the same assembly fail immediately, without any attempt to locate the assembly. This element disables that default behavior for binding failures that occur because the assembly could not be found in the probing path. These failures throw . - - Some binding and loading failures are not affected by this element, and are always cached. These failures occur because the assembly was found but could not be loaded. They throw or . The following list includes some examples of such failures. - -- If you attempt to load a file is not a valid assembly, subsequent attempts to load the assembly will fail even if the bad file is replaced with the correct assembly. - -- If you attempt to load an assembly that is locked by the file system, subsequent attempts to load the assembly will fail even after the assembly is released by the file system. - -- If one or more versions of the assembly that you are attempting to load is in the probing path, but the specific version you are requesting is not among them, subsequent attempts to load that version will fail even if the correct version is moved into the probing path. - -## Example - - The following example shows how to disable the caching of assembly binding failures that occur because the assembly was not found by probing. - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether to disable the caching of binding failures that occur because the assembly was not found by probing.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|0|Do not disable the caching of binding failures that occur because the assembly was not found by probing. This is the default binding behavior starting with .NET Framework version 2.0.| +|1|Disable the caching of binding failures that occur because the assembly was not found by probing. This setting reverts to the binding behavior of .NET Framework version 1.1.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Starting with .NET Framework version 2.0, the default behavior for loading assemblies is to cache all binding and loading failures. That is, if an attempt to load an assembly fails, subsequent requests to load the same assembly fail immediately, without any attempt to locate the assembly. This element disables that default behavior for binding failures that occur because the assembly could not be found in the probing path. These failures throw . + + Some binding and loading failures are not affected by this element, and are always cached. These failures occur because the assembly was found but could not be loaded. They throw or . The following list includes some examples of such failures. + +- If you attempt to load a file is not a valid assembly, subsequent attempts to load the assembly will fail even if the bad file is replaced with the correct assembly. + +- If you attempt to load an assembly that is locked by the file system, subsequent attempts to load the assembly will fail even after the assembly is released by the file system. + +- If one or more versions of the assembly that you are attempting to load is in the probing path, but the specific version you are requesting is not among them, subsequent attempts to load that version will fail even if the correct version is moved into the probing path. + +## Example + + The following example shows how to disable the caching of assembly binding failures that occur because the assembly was not found by probing. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/disablecommitthreadstack-element.md b/docs/framework/configure-apps/file-schema/runtime/disablecommitthreadstack-element.md index 452cdadcb39b1..458ccf590940e 100644 --- a/docs/framework/configure-apps/file-schema/runtime/disablecommitthreadstack-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/disablecommitthreadstack-element.md @@ -2,75 +2,75 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/disableCommitThreadStack" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#disableCommitThreadStack" -helpviewer_keywords: +helpviewer_keywords: - " element" - "disableCommitThreadStack element" ms.assetid: 3559d46a-7640-4c72-9a11-7e980768929e --- -# \ Element +# `` Element + +Specifies whether the full thread stack is committed when a thread is started. -Specifies whether the full thread stack is committed when a thread is started. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether committing the full thread stack on thread startup (the default behavior) is disabled.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|0|Do not disable the default behavior of the common language runtime, which is to commit the full thread stack when a thread is started.| -|1|Disable the default behavior of the common language runtime, which is to commit the full thread stack when a thread is started.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - The default behavior of the common language runtime is to commit the full thread stack when a thread is started. If a large number of threads must be created on a server that has limited memory, and most of those threads will use very little stack space, the server might perform better if the common language runtime does not commit the full thread stack immediately when a thread is started. - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether committing the full thread stack on thread startup (the default behavior) is disabled.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|0|Do not disable the default behavior of the common language runtime, which is to commit the full thread stack when a thread is started.| +|1|Disable the default behavior of the common language runtime, which is to commit the full thread stack when a thread is started.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + The default behavior of the common language runtime is to commit the full thread stack when a thread is started. If a large number of threads must be created on a server that has limited memory, and most of those threads will use very little stack space, the server might perform better if the common language runtime does not commit the full thread stack immediately when a thread is started. + > [!NOTE] -> Unmanaged hosts can use the `STARTUP_DISABLE_COMMITTHREADSTACK` startup flag in the [STARTUP_FLAGS](../../../unmanaged-api/hosting/startup-flags-enumeration.md) enumeration to accomplish the same result. - -## Example - - The following example shows how to disable the default behavior of the common language runtime, which is to commit the full thread stack on thread startup. - -```xml - - - - - -``` - +> Unmanaged hosts can use the `STARTUP_DISABLE_COMMITTHREADSTACK` startup flag in the [STARTUP_FLAGS](../../../unmanaged-api/hosting/startup-flags-enumeration.md) enumeration to accomplish the same result. + +## Example + + The following example shows how to disable the default behavior of the common language runtime, which is to commit the full thread stack on thread startup. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/disablefusionupdatesfromadmanager-element.md b/docs/framework/configure-apps/file-schema/runtime/disablefusionupdatesfromadmanager-element.md index af9f9518fc97b..a91ca05d79e4a 100644 --- a/docs/framework/configure-apps/file-schema/runtime/disablefusionupdatesfromadmanager-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/disablefusionupdatesfromadmanager-element.md @@ -2,77 +2,77 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "disableFusionUpdatesFromADManager element" - " element" ms.assetid: 58d2866c-37bd-4ffa-abaf-ff35926a2939 --- -# \ Element +# `` Element + +Specifies whether the default behavior, which is to allow the runtime host to override configuration settings for an application domain, is disabled. -Specifies whether the default behavior, which is to allow the runtime host to override configuration settings for an application domain, is disabled. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether the default ability to override Fusion settings is disabled.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|0|Do not disable the ability to override Fusion settings. This is the default behavior, starting with the .NET Framework 4.| -|1|Disable the ability to override Fusion settings. This reverts to the behavior of earlier versions of the .NET Framework.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Starting with the .NET Framework 4, the default behavior is to allow the object to override configuration settings by using the property or the method of the object that is passed to your implementation of the method, in your subclass of . For the default application domain, the settings you change override the settings that were specified by the application configuration file. For other application domains, they override the configuration settings that were passed to the or method. - - You can either pass new configuration information, or pass null (`Nothing` in Visual Basic) to eliminate configuration information that was passed in. - - Do not pass configuration information to both the property and the method. If you pass configuration information to both, the information you pass to the property is ignored, because the method overrides configuration information from the application configuration file. If you use the property, you can pass null (`Nothing` in Visual Basic) to the method to eliminate any configuration bytes that were specified in the call to the or method. - - In addition to configuration information, you can change the following settings on the object that is passed to your implementation of the method: , , , , , , , , , , , , and . - - As an alternative to using the `` element, you can disable the default behavior by creating a registry setting or by setting an environment variable. In the registry, create a DWORD value named `COMPLUS_disableFusionUpdatesFromADManager` under `HKCU\Software\Microsoft\.NETFramework` or `HKLM\Software\Microsoft\.NETFramework`, and set the value to 1. At the command line, set the environment variable `COMPLUS_disableFusionUpdatesFromADManager` to 1. - -## Example - - The following example shows how to disable the ability to override Fusion settings by using the `` element. - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether the default ability to override Fusion settings is disabled.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|0|Do not disable the ability to override Fusion settings. This is the default behavior, starting with the .NET Framework 4.| +|1|Disable the ability to override Fusion settings. This reverts to the behavior of earlier versions of the .NET Framework.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Starting with the .NET Framework 4, the default behavior is to allow the object to override configuration settings by using the property or the method of the object that is passed to your implementation of the method, in your subclass of . For the default application domain, the settings you change override the settings that were specified by the application configuration file. For other application domains, they override the configuration settings that were passed to the or method. + + You can either pass new configuration information, or pass null (`Nothing` in Visual Basic) to eliminate configuration information that was passed in. + + Do not pass configuration information to both the property and the method. If you pass configuration information to both, the information you pass to the property is ignored, because the method overrides configuration information from the application configuration file. If you use the property, you can pass null (`Nothing` in Visual Basic) to the method to eliminate any configuration bytes that were specified in the call to the or method. + + In addition to configuration information, you can change the following settings on the object that is passed to your implementation of the method: , , , , , , , , , , , , and . + + As an alternative to using the `` element, you can disable the default behavior by creating a registry setting or by setting an environment variable. In the registry, create a DWORD value named `COMPLUS_disableFusionUpdatesFromADManager` under `HKCU\Software\Microsoft\.NETFramework` or `HKLM\Software\Microsoft\.NETFramework`, and set the value to 1. At the command line, set the environment variable `COMPLUS_disableFusionUpdatesFromADManager` to 1. + +## Example + + The following example shows how to disable the ability to override Fusion settings by using the `` element. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/disablestackoverflowprobing-element.md b/docs/framework/configure-apps/file-schema/runtime/disablestackoverflowprobing-element.md index 79e31380824fc..f07c2ce15fe57 100644 --- a/docs/framework/configure-apps/file-schema/runtime/disablestackoverflowprobing-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/disablestackoverflowprobing-element.md @@ -3,7 +3,7 @@ description: "Learn more about the element" title: " Element" ms.date: 04/20/2022 --- -# \ Element +# `` Element Specifies whether stack-overflow probing is disabled. @@ -44,5 +44,5 @@ The `` specifies whether stack-overflow probing is ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element](runtime-element.md) -- [\ Element](../configuration-element.md) +- [`` Element](runtime-element.md) +- [`` Element](../configuration-element.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/enableampmparseadjustment-element.md b/docs/framework/configure-apps/file-schema/runtime/enableampmparseadjustment-element.md index 2c87a847f0ed5..00f0e496a943f 100644 --- a/docs/framework/configure-apps/file-schema/runtime/enableampmparseadjustment-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/enableampmparseadjustment-element.md @@ -4,82 +4,82 @@ title: " Element" ms.date: "03/30/2017" ms.assetid: fda998a5-f538-4f8b-a18c-ee7f35e16938 --- -# \ Element +# `` Element + +Determines whether date and time parsing methods use an adjusted set of rules to parse date strings that contain a day, month, hour, and AM/PM designator. -Determines whether date and time parsing methods use an adjusted set of rules to parse date strings that contain a day, month, hour, and AM/PM designator. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies whether date and time parsing methods use an adjusted set of rules to parse date strings that contain only a day, month, hour, and AM/PM designator.| - -### enabled Attribute - -|Value|Description| -|-----------|-----------------| -|0|Date and time parsing methods do not use adjusted rules for parsing date strings that contain only a day, month, hour, and AM/PM designator.| -|1|Date and time parsing methods use adjusted rules for parsing date strings that contain only a day, month, hour, and AM/PM designator.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about runtime initialization options.| - -## Remarks - - The `` element controls how the following methods parse a date string that contains a numeric day and month followed by an hour and an AM/PM designator (such as "4/10 6 AM"): - -- - -- - -- - -- - -- - - No other patterns are affected. - - The `` element has no effect on the , , , and methods. - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies whether date and time parsing methods use an adjusted set of rules to parse date strings that contain only a day, month, hour, and AM/PM designator.| + +### enabled Attribute + +|Value|Description| +|-----------|-----------------| +|0|Date and time parsing methods do not use adjusted rules for parsing date strings that contain only a day, month, hour, and AM/PM designator.| +|1|Date and time parsing methods use adjusted rules for parsing date strings that contain only a day, month, hour, and AM/PM designator.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about runtime initialization options.| + +## Remarks + + The `` element controls how the following methods parse a date string that contains a numeric day and month followed by an hour and an AM/PM designator (such as "4/10 6 AM"): + +- + +- + +- + +- + +- + + No other patterns are affected. + + The `` element has no effect on the , , , and methods. + > [!IMPORTANT] -> In .NET Core and .NET Native, the adjusted AM/PM parsing rules are enabled by default. - - If the parsing adjustment rule is not enabled, the first digit of the string is interpreted as the hour of the 12-hour clock, and the remainder of the string except for the AM/PM designator is ignored. The date and time returned by the parsing method consists of the current date and the hour of the day extracted from the date string. - - If the parsing adjustment rule is enabled, parsing method interpret the day and month as belonging to the current year, and interpret the time as the hour of the 12-hour clock. - - The following table illustrates the difference in the value when the method is used to parse the string ""4/10 6 AM" with the `` element's `enabled` property set to "0" or "1". It assumes that today's date is January 5, 2017, and displays the date as if it is formatted using the specified culture's "G" format string. - -|Culture name|enabled="0"|enabled="1"| -|------------------|------------------|------------------| -|en-US|1/5/2017 4:00:00 AM|4/10/2017 6:00:00 AM| -|en-GB|5/1/2017 6:00:00|10/4/2017 6:00:00| - +> In .NET Core and .NET Native, the adjusted AM/PM parsing rules are enabled by default. + + If the parsing adjustment rule is not enabled, the first digit of the string is interpreted as the hour of the 12-hour clock, and the remainder of the string except for the AM/PM designator is ignored. The date and time returned by the parsing method consists of the current date and the hour of the day extracted from the date string. + + If the parsing adjustment rule is enabled, parsing method interpret the day and month as belonging to the current year, and interpret the time as the hour of the 12-hour clock. + + The following table illustrates the difference in the value when the method is used to parse the string ""4/10 6 AM" with the `` element's `enabled` property set to "0" or "1". It assumes that today's date is January 5, 2017, and displays the date as if it is formatted using the specified culture's "G" format string. + +|Culture name|enabled="0"|enabled="1"| +|------------------|------------------|------------------| +|en-US|1/5/2017 4:00:00 AM|4/10/2017 6:00:00 AM| +|en-GB|5/1/2017 6:00:00|10/4/2017 6:00:00| + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element](runtime-element.md) -- [\ Element](../configuration-element.md) +- [`` Element](runtime-element.md) +- [`` Element](../configuration-element.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/enforcefipspolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/enforcefipspolicy-element.md index a5001e4812f26..ad6c211087505 100644 --- a/docs/framework/configure-apps/file-schema/runtime/enforcefipspolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/enforcefipspolicy-element.md @@ -2,73 +2,73 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "enforceFIPSPolicy element" - "FIPS" - " element" - "Federal Information Processing Standards (FIPS)" ms.assetid: c35509c4-35cf-43c0-bb47-75e4208aa24e --- -# \ Element +# `` Element + +Specifies whether to enforce a computer configuration requirement that cryptographic algorithms must comply with the Federal Information Processing Standards (FIPS). -Specifies whether to enforce a computer configuration requirement that cryptographic algorithms must comply with the Federal Information Processing Standards (FIPS). - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether to enable the enforcement of a computer configuration requirement that cryptographic algorithms must be compliant with FIPS.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`true`|If your computer is configured to require cryptographic algorithms to be FIPS compliant, that requirement is enforced. If a class implements an algorithm that is not compliant with FIPS, the constructors or `Create` methods for that class throw exceptions when they are run on that computer. This is the default.| -|`false`|Cryptographic algorithms that are used by the application are not required to be compliant with FIPS, regardless of computer configuration.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Starting with .NET Framework 2.0, the creation of classes that implement cryptographic algorithms is controlled by the configuration of the computer. If the computer is configured to require algorithms to be compliant with FIPS, and a class implements an algorithm that is not compliant with FIPS, any attempt to create an instance of that class throws an exception. Constructors throw an exception, and `Create` methods throw a exception with an inner exception. - - If your application runs on computers whose configurations require compliance with FIPS, and your application uses an algorithm that is not compliant with FIPS, you can use this element in your configuration file to prevent the common language runtime (CLR) from enforcing FIPS compliance. This element was introduced in the .NET Framework 2.0 Service Pack 1. - -## Example - - The following example shows how to prevent the CLR from enforcing FIPS compliance. - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether to enable the enforcement of a computer configuration requirement that cryptographic algorithms must be compliant with FIPS.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`true`|If your computer is configured to require cryptographic algorithms to be FIPS compliant, that requirement is enforced. If a class implements an algorithm that is not compliant with FIPS, the constructors or `Create` methods for that class throw exceptions when they are run on that computer. This is the default.| +|`false`|Cryptographic algorithms that are used by the application are not required to be compliant with FIPS, regardless of computer configuration.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Starting with .NET Framework 2.0, the creation of classes that implement cryptographic algorithms is controlled by the configuration of the computer. If the computer is configured to require algorithms to be compliant with FIPS, and a class implements an algorithm that is not compliant with FIPS, any attempt to create an instance of that class throws an exception. Constructors throw an exception, and `Create` methods throw a exception with an inner exception. + + If your application runs on computers whose configurations require compliance with FIPS, and your application uses an algorithm that is not compliant with FIPS, you can use this element in your configuration file to prevent the common language runtime (CLR) from enforcing FIPS compliance. This element was introduced in the .NET Framework 2.0 Service Pack 1. + +## Example + + The following example shows how to prevent the CLR from enforcing FIPS compliance. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/etwenable-element.md b/docs/framework/configure-apps/file-schema/runtime/etwenable-element.md index 7be7c687937a5..79beb5f7f8e77 100644 --- a/docs/framework/configure-apps/file-schema/runtime/etwenable-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/etwenable-element.md @@ -2,72 +2,72 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "etwEnable element" - " element" ms.assetid: 29dde982-6d8b-4099-8867-ad0d7733f6dc --- -# \ Element +# `` Element + +Specifies whether to enable event tracing for Windows (ETW) for common language runtime events. -Specifies whether to enable event tracing for Windows (ETW) for common language runtime events. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether ETW should be enabled.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|true|Enable ETW. This is the default for versions of Windows beginning with the Windows Vista and Windows Server 2008 operating systems.| -|false|Disable ETW. This is the default for earlier versions of Windows.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Beginning with Windows Vista, ETW is enabled by default. Use this element to disable ETW for an application. In earlier versions of Windows, use this element to enable ETW for an application. - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether ETW should be enabled.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|true|Enable ETW. This is the default for versions of Windows beginning with the Windows Vista and Windows Server 2008 operating systems.| +|false|Disable ETW. This is the default for earlier versions of Windows.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Beginning with Windows Vista, ETW is enabled by default. Use this element to disable ETW for an application. In earlier versions of Windows, use this element to enable ETW for an application. + > [!NOTE] -> ETW can be enabled or disabled globally on a server by using a registry setting. See [Controlling .NET Framework Logging](../../../performance/controlling-logging.md). - -## Example - - The following example shows how to enable ETW tracing for an application. - -```xml - - - - - -``` - +> ETW can be enabled or disabled globally on a server by using a registry setting. See [Controlling .NET Framework Logging](../../../performance/controlling-logging.md). + +## Example + + The following example shows how to enable ETW tracing for an application. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md b/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md index bfee73d57e241..54ecf602b725c 100644 --- a/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md @@ -2,81 +2,81 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "forcePerformanceCounterUniqueSharedMemoryReads element" - " element" ms.assetid: 91149858-4810-4f65-9b48-468488172c9b --- -# \ Element +# `` Element + +Specifies whether PerfCounter.dll uses the CategoryOptions registry setting in a .NET Framework version 1.1 application to determine whether to load performance counter data from category-specific shared memory or global memory. -Specifies whether PerfCounter.dll uses the CategoryOptions registry setting in a .NET Framework version 1.1 application to determine whether to load performance counter data from category-specific shared memory or global memory. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Indicates whether PerfCounter.dll uses the CategoryOptions registry setting to determine whether to load performance counter data from category-specific shared memory or global memory.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`false`|PerfCounter.dll does not use the CategoryOptions registry setting This is the default.| -|`true`|PerfCounter.dll does use the CategoryOptions registry setting.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - In versions of the .NET Framework before the .NET Framework 4, the version of PerfCounter.dll that was loaded corresponded to the runtime that was loaded in the process. If a computer had both the .NET Framework version 1.1 and the .NET Framework 2.0 installed, a .NET Framework 1.1 application would load the .NET Framework 1.1 version of PerfCounter.dll. Starting with the .NET Framework 4, the newest installed version of PerfCounter.dll is loaded. This means that a .NET Framework 1.1 application will load the .NET Framework 4 version of PerfCounter.dll if the .NET Framework 4 is installed on the computer. - - Starting with the .NET Framework 4, when consuming performance counters, PerfCounter.dll checks the CategoryOptions registry entry for each provider to determine whether it should read from category-specific shared memory or global shared memory. The .NET Framework 1.1 PerfCounter.dll does not read that registry entry, because it is not aware of category-specific shared memory; it always reads from global shared memory. - - For backward compatibility, the .NET Framework 4 PerfCounter.dll does not check the CategoryOptions registry entry when running in a .NET Framework 1.1 application. It simply uses global shared memory, just like the .NET Framework 1.1 PerfCounter.dll. However, you can instruct the .NET Framework 4 PerfCounter.dll to check the registry setting by enabling the `` element. - +enabled="true|false"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Indicates whether PerfCounter.dll uses the CategoryOptions registry setting to determine whether to load performance counter data from category-specific shared memory or global memory.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`false`|PerfCounter.dll does not use the CategoryOptions registry setting This is the default.| +|`true`|PerfCounter.dll does use the CategoryOptions registry setting.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + In versions of the .NET Framework before the .NET Framework 4, the version of PerfCounter.dll that was loaded corresponded to the runtime that was loaded in the process. If a computer had both the .NET Framework version 1.1 and the .NET Framework 2.0 installed, a .NET Framework 1.1 application would load the .NET Framework 1.1 version of PerfCounter.dll. Starting with the .NET Framework 4, the newest installed version of PerfCounter.dll is loaded. This means that a .NET Framework 1.1 application will load the .NET Framework 4 version of PerfCounter.dll if the .NET Framework 4 is installed on the computer. + + Starting with the .NET Framework 4, when consuming performance counters, PerfCounter.dll checks the CategoryOptions registry entry for each provider to determine whether it should read from category-specific shared memory or global shared memory. The .NET Framework 1.1 PerfCounter.dll does not read that registry entry, because it is not aware of category-specific shared memory; it always reads from global shared memory. + + For backward compatibility, the .NET Framework 4 PerfCounter.dll does not check the CategoryOptions registry entry when running in a .NET Framework 1.1 application. It simply uses global shared memory, just like the .NET Framework 1.1 PerfCounter.dll. However, you can instruct the .NET Framework 4 PerfCounter.dll to check the registry setting by enabling the `` element. + > [!NOTE] -> Enabling the `` element does not guarantee that category-specific shared memory will be used. Setting enabled to `true` only causes PerfCounter.dll to reference the CategoryOptions registry setting. The default setting for CategoryOptions is to use category-specific shared memory; however, you can change CategoryOptions to indicate that global shared memory should be used. - - The registry key that contains the CategoryOptions setting is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\\\Performance. By default, CategoryOptions is set to 3, which instructs PerfCounter.dll to use category-specific shared memory. If CategoryOptions is set to 0, PerfCounter.dll uses global shared memory. Instance data will be reused only if the name of the instance being created is identical to the instance being reused. All versions will be able to write to the category. If CategoryOptions is set to 1, global shared memory is used, but instance data can be reused if the category name is the same length as the category being reused. - - The settings 0 and 1 can lead to memory leaks and the filling up of performance counter memory. - -## Example - - The following example shows how to specify that PerfCounter.dll should reference the CategoryOptions registry entry to determine whether it should use category-specific shared memory. - -```xml - - - - - -``` - +> Enabling the `` element does not guarantee that category-specific shared memory will be used. Setting enabled to `true` only causes PerfCounter.dll to reference the CategoryOptions registry setting. The default setting for CategoryOptions is to use category-specific shared memory; however, you can change CategoryOptions to indicate that global shared memory should be used. + + The registry key that contains the CategoryOptions setting is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\\\Performance. By default, CategoryOptions is set to 3, which instructs PerfCounter.dll to use category-specific shared memory. If CategoryOptions is set to 0, PerfCounter.dll uses global shared memory. Instance data will be reused only if the name of the instance being created is identical to the instance being reused. All versions will be able to write to the category. If CategoryOptions is set to 1, global shared memory is used, but instance data can be reused if the category name is the same length as the category being reused. + + The settings 0 and 1 can lead to memory leaks and the filling up of performance counter memory. + +## Example + + The following example shows how to specify that PerfCounter.dll should reference the CategoryOptions registry entry to determine whether it should use category-specific shared memory. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md b/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md index f28332ea7f021..05c04228edd29 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md @@ -2,74 +2,74 @@ description: "Learn more about: element" title: "gcAllowVeryLargeObjects element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "gcAllowVeryLargeObjects element" - " element" ms.assetid: 5c7ea24a-39ac-4e5f-83b7-b9f9a1b556ab --- -# \ element +# `` element + +On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size. -On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - +    **\** + +## Syntax + +```xml + +``` + ## Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies whether arrays that are greater than 2 GB in total size are enabled on 64-bit platforms.| - -### enabled attribute - -|Value|Description| -|-----------|-----------------| -|`false`|Arrays greater than 2 GB in total size are not enabled. This is the default.| -|`true`|Arrays greater than 2 GB in total size are enabled on 64-bit platforms.| - -## Child elements - -None. - + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies whether arrays that are greater than 2 GB in total size are enabled on 64-bit platforms.| + +### enabled attribute + +|Value|Description| +|-----------|-----------------| +|`false`|Arrays greater than 2 GB in total size are not enabled. This is the default.| +|`true`|Arrays greater than 2 GB in total size are enabled on 64-bit platforms.| + +## Child elements + +None. + ## Parent elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about runtime initialization options.| - -## Remarks - - Using this element in your [application configuration file](../../index.md) enables arrays that are larger than 2 GB in size, but does not change other limits on object size or array size: - -- The maximum number of elements in an array is . - -- The maximum size in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for arrays containing other types. - -- The maximum size for strings and other non-array objects is unchanged. - + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about runtime initialization options.| + +## Remarks + + Using this element in your [application configuration file](../../index.md) enables arrays that are larger than 2 GB in size, but does not change other limits on object size or array size: + +- The maximum number of elements in an array is . + +- The maximum size in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for arrays containing other types. + +- The maximum size for strings and other non-array objects is unchanged. + > [!CAUTION] -> Before enabling this feature, ensure that your application does not include unsafe code that assumes that all arrays are smaller than 2 GB in size. For example, unsafe code that uses arrays as buffers might be susceptible to buffer overruns if it's written on the assumption that arrays will not exceed 2 GB. - -## Example - - The following *app.config* file snippet shows how to enable this feature for a .NET Framework application. - -```xml - - - - - -``` - +> Before enabling this feature, ensure that your application does not include unsafe code that assumes that all arrays are smaller than 2 GB in size. For example, unsafe code that uses arrays as buffers might be susceptible to buffer overruns if it's written on the assumption that arrays will not exceed 2 GB. + +## Example + + The following *app.config* file snippet shows how to enable this feature for a .NET Framework application. + +```xml + + + + + +``` + ## Supported in .NET Framework 4.5 and later versions diff --git a/docs/framework/configure-apps/file-schema/runtime/gcconcurrent-element.md b/docs/framework/configure-apps/file-schema/runtime/gcconcurrent-element.md index 36458d2ac9964..7c6386c5da3ff 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcconcurrent-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcconcurrent-element.md @@ -11,7 +11,7 @@ helpviewer_keywords: - " element" ms.assetid: 503f55ba-26ed-45ac-a2ea-caf994da04cd --- -# \ element +# `` element Specifies whether the common language runtime runs garbage collection on a separate thread. @@ -56,14 +56,14 @@ None. ## Remarks -Prior to .NET Framework 4, workstation garbage collection supported concurrent garbage collection, which performed garbage collection in the background on a separate thread. In .NET Framework 4, concurrent garbage collection was replaced by background GC, which also performs garbage collection in the background on a separate thread. Starting with .NET Framework 4.5, background collection became available in server garbage collection. The **gcConcurrent** element controls whether the runtime performs either concurrent or background garbage collection, if it's available, or whether it performs garbage collection in the foreground. +Prior to .NET Framework 4, workstation garbage collection supported concurrent garbage collection, which performed garbage collection in the background on a separate thread. In .NET Framework 4, concurrent garbage collection was replaced by background GC, which also performs garbage collection in the background on a separate thread. Starting with .NET Framework 4.5, background collection became available in server garbage collection. The `gcConcurrent` element controls whether the runtime performs either concurrent or background garbage collection, if it's available, or whether it performs garbage collection in the foreground. ### To disable background garbage collection > [!WARNING] -> Starting with .NET Framework 4, concurrent garbage collection is replaced by background garbage collection. The terms *concurrent* and *background* are used interchangeably in the .NET Framework documentation. To disable background garbage collection, use the **gcConcurrent** element, as discussed in this article. +> Starting with .NET Framework 4, concurrent garbage collection is replaced by background garbage collection. The terms *concurrent* and *background* are used interchangeably in the .NET Framework documentation. To disable background garbage collection, use the `gcConcurrent` element, as discussed in this article. -By default, the runtime uses concurrent or background garbage collection, which is optimized for latency. If your application involves heavy user interaction, leave concurrent garbage collection enabled to minimize the application's pause time to perform garbage collection. If you set the `enabled` attribute of the **gcConcurrent** element to `false`, the runtime uses non-concurrent garbage collection, which is optimized for throughput. +By default, the runtime uses concurrent or background garbage collection, which is optimized for latency. If your application involves heavy user interaction, leave concurrent garbage collection enabled to minimize the application's pause time to perform garbage collection. If you set the `enabled` attribute of the `gcConcurrent` element to `false`, the runtime uses non-concurrent garbage collection, which is optimized for throughput. The following configuration file disables background garbage collection: @@ -75,7 +75,7 @@ The following configuration file disables background garbage collection:
``` -If there's a **gcConcurrentSetting** setting in the machine configuration file, it defines the default value for all .NET Framework applications. The machine configuration file setting overrides the application configuration file setting. +If there's a `gcConcurrentSetting` setting in the machine configuration file, it defines the default value for all .NET Framework applications. The machine configuration file setting overrides the application configuration file setting. For more information on concurrent and background garbage collection, see [Background garbage collection](../../../../standard/garbage-collection/background-gc.md). diff --git a/docs/framework/configure-apps/file-schema/runtime/gccpugroup-element.md b/docs/framework/configure-apps/file-schema/runtime/gccpugroup-element.md index 27d190bd95534..a21d8e33062e4 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gccpugroup-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gccpugroup-element.md @@ -7,7 +7,7 @@ helpviewer_keywords: - " element" ms.assetid: c1fc7d6c-7220-475c-a312-5b8b201f66e0 --- -# \ Element +# `` Element Specifies whether garbage collection supports multiple CPU groups. diff --git a/docs/framework/configure-apps/file-schema/runtime/gcheapaffinitizemask-element.md b/docs/framework/configure-apps/file-schema/runtime/gcheapaffinitizemask-element.md index 5f6053246f995..35867a2aa2394 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcheapaffinitizemask-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcheapaffinitizemask-element.md @@ -6,7 +6,7 @@ helpviewer_keywords: - "gcHeapCount element" - " element" --- -# \ element +# `` element Defines the affinity between GC heaps and individual processors. @@ -50,11 +50,11 @@ None. ## Remarks -By default, server GC threads are hard-affinitized with their respective CPU so that there is one GC heap, one server GC thread, and one background server GC thread for each processor. Starting with .NET Framework 4.6.2, you can use the **GCHeapAffinitizeMask** element to control the affinity between server GC heaps and processors when the number of heaps is limited by the **GCHeapCount** element. +By default, server GC threads are hard-affinitized with their respective CPU so that there is one GC heap, one server GC thread, and one background server GC thread for each processor. Starting with .NET Framework 4.6.2, you can use the `GCHeapAffinitizeMask` element to control the affinity between server GC heaps and processors when the number of heaps is limited by the `GCHeapCount` element. **GCHeapAffinitizeMask** is typically used along with two other flags: -- [GCNoAffinitize](gcnoaffinitize-element.md), which controls whether server GC threads/heaps are affinitized with CPUs. The `enabled` attribute of the [GCNoAffinitize](gcnoaffinitize-element.md) element must be `false` (its default value) for the **GCHeapAffinitizeMask** setting to be used. +- [GCNoAffinitize](gcnoaffinitize-element.md), which controls whether server GC threads/heaps are affinitized with CPUs. The `enabled` attribute of the [GCNoAffinitize](gcnoaffinitize-element.md) element must be `false` (its default value) for the `GCHeapAffinitizeMask` setting to be used. - [GCHeapCount](gcheapcount-element.md), which limits the number of heaps used by the process for server GC. By default, there is one heap for each processor. @@ -68,7 +68,7 @@ A value of 1023 is 0x3FF or 0011 1111 1111b. The process uses 10 processors, fro ## Example -The following example indicates that an application uses server GC with 10 heaps/threads. Since you don't want those heaps to overlap with heaps from other applications running on the system, use **GCHeapAffinitizeMask** to specify that the process should use CPUs 0 through 9. +The following example indicates that an application uses server GC with 10 heaps/threads. Since you don't want those heaps to overlap with heaps from other applications running on the system, use `GCHeapAffinitizeMask` to specify that the process should use CPUs 0 through 9. ```xml diff --git a/docs/framework/configure-apps/file-schema/runtime/gcheapcount-element.md b/docs/framework/configure-apps/file-schema/runtime/gcheapcount-element.md index 2abf7c6bf0e14..e9e44a417046b 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcheapcount-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcheapcount-element.md @@ -6,7 +6,7 @@ helpviewer_keywords: - "gcHeapCount element" - " element" --- -# \ element +# `` element Specifies the number of heaps/threads to use for server garbage collection. @@ -50,7 +50,7 @@ None. ## Remarks -By default, server GC threads are hard-affinitized with their respective CPU so that there is one GC heap, one server GC thread, and one background server GC thread for each processor. Starting with .NET Framework 4.6.2, you can use the **GCHeapCount** element to limit the number of heaps used by your application for server GC. Limiting the number of heaps used for server GC is particularly useful for systems that run multiple instances of a server application. +By default, server GC threads are hard-affinitized with their respective CPU so that there is one GC heap, one server GC thread, and one background server GC thread for each processor. Starting with .NET Framework 4.6.2, you can use the `GCHeapCount` element to limit the number of heaps used by your application for server GC. Limiting the number of heaps used for server GC is particularly useful for systems that run multiple instances of a server application. **GCHeapCount** is typically used along with two other flags: @@ -58,13 +58,13 @@ By default, server GC threads are hard-affinitized with their respective CPU so - [GCHeapAffinitizeMask](gcheapaffinitizemask-element.md), which controls the affinity of GC threads/heaps with CPUs. -If **GCHeapCount** is set and **GCNoAffinitize** is disabled (its default setting), there is an affinity between the *nn* GC threads/heaps and the first *nn* processors. You can use the **GCHeapAffinitizeMask** element to specify which processors are used by the process's server GC heaps. Otherwise, if multiple server processes are running on a system, their processor usage will overlap. +If `GCHeapCount` is set and `GCNoAffinitize` is disabled (its default setting), there is an affinity between the *nn* GC threads/heaps and the first *nn* processors. You can use the `GCHeapAffinitizeMask` element to specify which processors are used by the process's server GC heaps. Otherwise, if multiple server processes are running on a system, their processor usage will overlap. -If **GCHeapCount** is set and **GCNoAffinitize** is enabled, the garbage collector limits the number of processors used for server GC but does not affinitize GC heaps and processors. +If `GCHeapCount` is set and `GCNoAffinitize` is enabled, the garbage collector limits the number of processors used for server GC but does not affinitize GC heaps and processors. ## Example -The following example indicates that an application uses server GC with 10 heaps/threads. Since you don't want those heaps to overlap with heaps from other applications running on the system, you use the **GCHeapAffinitizeMask** to specify that the process should use CPUs 0 through 9. +The following example indicates that an application uses server GC with 10 heaps/threads. Since you don't want those heaps to overlap with heaps from other applications running on the system, you use the `GCHeapAffinitizeMask` to specify that the process should use CPUs 0 through 9. ```xml diff --git a/docs/framework/configure-apps/file-schema/runtime/gcnoaffinitize-element.md b/docs/framework/configure-apps/file-schema/runtime/gcnoaffinitize-element.md index 0a465461abf1b..baa9b61a256a1 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcnoaffinitize-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcnoaffinitize-element.md @@ -6,7 +6,7 @@ helpviewer_keywords: - "gcNoAffinitize element" - " element" --- -# \ element +# `` element Specifies whether or not to affinitize server GC threads with CPUs. @@ -51,11 +51,11 @@ None. ## Remarks -By default, server GC threads are hard-affinitized with their respective CPUs. Each of the system's available processors has its own GC heap and thread. This is typically the preferred setting since it optimizes cache usage. Starting with .NET Framework 4.6.2, by setting the **GCNoAffinitize** element's `enabled` attribute to `true`, you can specify that server GC threads and CPUs should not be tightly coupled. +By default, server GC threads are hard-affinitized with their respective CPUs. Each of the system's available processors has its own GC heap and thread. This is typically the preferred setting since it optimizes cache usage. Starting with .NET Framework 4.6.2, by setting the `GCNoAffinitize` element's `enabled` attribute to `true`, you can specify that server GC threads and CPUs should not be tightly coupled. -You can specify the **GCNoAffinitize** configuration element alone to not affinitize server GC threads with CPUs. You can also use it along with the [GCHeapCount](gcheapcount-element.md) element to control the number of GC heaps and threads used by an application. +You can specify the `GCNoAffinitize` configuration element alone to not affinitize server GC threads with CPUs. You can also use it along with the [GCHeapCount](gcheapcount-element.md) element to control the number of GC heaps and threads used by an application. -If the `enabled` attribute of the **GCNoAffinitize** element is `false` (its default value), you can also use the [GCHeapCount](gcheapcount-element.md) element to specify the number of GC threads and heaps, along with the [GCHeapAffinitizeMask](gcheapaffinitizemask-element.md) element to specify the processors to which the GC threads and heaps are affinitized. +If the `enabled` attribute of the `GCNoAffinitize` element is `false` (its default value), you can also use the [GCHeapCount](gcheapcount-element.md) element to specify the number of GC threads and heaps, along with the [GCHeapAffinitizeMask](gcheapaffinitizemask-element.md) element to specify the processors to which the GC threads and heaps are affinitized. ## Example diff --git a/docs/framework/configure-apps/file-schema/runtime/gcserver-element.md b/docs/framework/configure-apps/file-schema/runtime/gcserver-element.md index 2b150359b72f4..0db0d3c445aad 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcserver-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcserver-element.md @@ -10,7 +10,7 @@ helpviewer_keywords: - " element" ms.assetid: 8d25b80e-2581-4803-bd87-a59528e3cb03 --- -# \ element +# `` element Specifies whether the common language runtime runs server garbage collection. @@ -55,14 +55,14 @@ None. ## Remarks -The common language runtime (CLR) supports two types of garbage collection: workstation garbage collection, which is available on all systems, and server garbage collection, which is available on multiprocessor systems. Use the **gcServer** element to control the type of garbage collection the CLR performs. Use the property to determine if server garbage collection is enabled. +The common language runtime (CLR) supports two types of garbage collection: workstation garbage collection, which is available on all systems, and server garbage collection, which is available on multiprocessor systems. Use the `gcServer` element to control the type of garbage collection the CLR performs. Use the property to determine if server garbage collection is enabled. For single-processor computers, the default workstation garbage collection should be the fastest option. Either workstation or server can be used for two-processor computers. Server garbage collection should be the fastest option for more than two processors. Most commonly, multiprocessor server systems disable server GC and use workstation GC instead when many instances of a server app run on the same machine. This element can be used only in the application configuration file; it is ignored if it is in the machine configuration file. > [!NOTE] -> In the .NET Framework 4 and earlier versions, concurrent garbage collection is not available when server garbage collection is enabled. Starting with .NET Framework 4.5, server garbage collection is concurrent. To use non-concurrent server garbage collection, set the **gcServer** element to `true` and the [gcConcurrent element](gcconcurrent-element.md) to `false`. +> In the .NET Framework 4 and earlier versions, concurrent garbage collection is not available when server garbage collection is enabled. Starting with .NET Framework 4.5, server garbage collection is concurrent. To use non-concurrent server garbage collection, set the `gcServer` element to `true` and the [gcConcurrent element](gcconcurrent-element.md) to `false`. Starting with .NET Framework 4.6.2, you can also use the following elements to configure server GC: diff --git a/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md b/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md index 9e6b3295e8670..9c3dd2adc1f27 100644 --- a/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md @@ -7,7 +7,7 @@ helpviewer_keywords: - " element" ms.assetid: 7d208f50-e8d5-4a42-bc1a-1cf3590706a8 --- -# \ Element +# `` Element Specifies whether the runtime creates evidence for code access security (CAS). diff --git a/docs/framework/configure-apps/file-schema/runtime/index.md b/docs/framework/configure-apps/file-schema/runtime/index.md index a3e25b96e4506..9f31eaff4555a 100644 --- a/docs/framework/configure-apps/file-schema/runtime/index.md +++ b/docs/framework/configure-apps/file-schema/runtime/index.md @@ -12,7 +12,7 @@ ms.assetid: f04816ab-110d-4e28-9283-845d6d9a4a68 Runtime settings are used by the common language runtime to configure applications that target .NET Framework. This article shows the schema for runtime settings in an [application configuration file](../../index.md). -## The \ section and its parent and child elements +## The `` section and its parent and child elements [\](../configuration-element.md)\   [\](runtime-element.md)\ @@ -72,7 +72,7 @@ Runtime settings are used by the common language runtime to configure applicatio         [\](clear-element-for-namedcaches.md)\         [\](remove-element-for-namedcaches.md) -## Alphabetical list of \ elements +## Alphabetical list of `` elements |Element|Description| |-------------|-----------------| diff --git a/docs/framework/configure-apps/file-schema/runtime/legacycorruptedstateexceptionspolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/legacycorruptedstateexceptionspolicy-element.md index 742183aaeff47..181313fa02ac2 100644 --- a/docs/framework/configure-apps/file-schema/runtime/legacycorruptedstateexceptionspolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/legacycorruptedstateexceptionspolicy-element.md @@ -2,79 +2,79 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element" - "legacyCorruptedStateExceptionsPolicy element" ms.assetid: e0a55ddc-bfa8-4f3e-ac14-d1fc3330e4bb --- -# \ Element +# `` Element + +Specifies whether the common language runtime allows managed code to catch access violations and other corrupted state exceptions. -Specifies whether the common language runtime allows managed code to catch access violations and other corrupted state exceptions. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies that the application will catch corrupting state exception failures such as access violations.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`false`|The application will not catch corrupting state exception failures such as access violations. This is the default.| -|`true`|The application will catch corrupting state exception failures such as access violations.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - In the .NET Framework version 3.5 and earlier, the common language runtime allowed managed code to catch exceptions that were raised by corrupted process states. An access violation is an example of this type of exception. - - Starting with the .NET Framework 4, managed code no longer catches these types of exceptions in `catch` blocks. However, you can override this change and maintain the handling of corrupted state exceptions in two ways: - -- Set the `` element's `enabled` attribute to `true`. This configuration setting is applied processwide and affects all methods. - - -or- - -- Apply the attribute to the method that contains the exceptions `catch` block. - - This configuration element is available only in the .NET Framework 4 and later. - -## Example - - The following example shows how to specify that the application should revert to the behavior before the .NET Framework 4, and catch all corrupting state exception failures. - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies that the application will catch corrupting state exception failures such as access violations.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`false`|The application will not catch corrupting state exception failures such as access violations. This is the default.| +|`true`|The application will catch corrupting state exception failures such as access violations.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + In the .NET Framework version 3.5 and earlier, the common language runtime allowed managed code to catch exceptions that were raised by corrupted process states. An access violation is an example of this type of exception. + + Starting with the .NET Framework 4, managed code no longer catches these types of exceptions in `catch` blocks. However, you can override this change and maintain the handling of corrupted state exceptions in two ways: + +- Set the `` element's `enabled` attribute to `true`. This configuration setting is applied processwide and affects all methods. + + -or- + +- Apply the attribute to the method that contains the exceptions `catch` block. + + This configuration element is available only in the .NET Framework 4 and later. + +## Example + + The following example shows how to specify that the application should revert to the behavior before the .NET Framework 4, and catch all corrupting state exception failures. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md index 6222119c6e0ae..899eefb7ca47a 100644 --- a/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md @@ -2,121 +2,121 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#legacyImpersonationPolicy" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/legacyImpersonationPolicy" -helpviewer_keywords: +helpviewer_keywords: - " element" - "legacyImpersonationPolicy element" ms.assetid: 6e00af10-42f3-4235-8415-1bb2db78394e --- -# \ Element +# `` Element + +Specifies that the Windows identity does not flow across asynchronous points, regardless of the flow settings for the execution context on the current thread. -Specifies that the Windows identity does not flow across asynchronous points, regardless of the flow settings for the execution context on the current thread. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies that the does not flow across asynchronous points, regardless of the flow settings on the current thread.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`false`| flows across asynchronous points depending upon the flow settings for the current thread. This is the default.| -|`true`| does not flow across asynchronous points, regardless of the flow settings on the current thread.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - In the .NET Framework versions 1.0 and 1.1, the does not flow across any user-defined asynchronous points. Starting with .NET Framework version 2.0, there is an object that contains information about the currently executing thread, and it flows across asynchronous points within an application domain. The is included in this execution context and therefore also flows across the asynchronous points, which means that if an impersonation context exists, it will flow as well. - - Starting with .NET Framework 2.0, you can use the `` element to specify that does not flow across asynchronous points. - + enabled="true|false"/> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies that the does not flow across asynchronous points, regardless of the flow settings on the current thread.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`false`| flows across asynchronous points depending upon the flow settings for the current thread. This is the default.| +|`true`| does not flow across asynchronous points, regardless of the flow settings on the current thread.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + In the .NET Framework versions 1.0 and 1.1, the does not flow across any user-defined asynchronous points. Starting with .NET Framework version 2.0, there is an object that contains information about the currently executing thread, and it flows across asynchronous points within an application domain. The is included in this execution context and therefore also flows across the asynchronous points, which means that if an impersonation context exists, it will flow as well. + + Starting with .NET Framework 2.0, you can use the `` element to specify that does not flow across asynchronous points. + > [!NOTE] -> The common language runtime (CLR) is aware of impersonation operations performed using only managed code, not of impersonation performed outside of managed code, such as through platform invoke to unmanaged code or through direct calls to Win32 functions. Only managed objects can flow across asynchronous points, unless the `alwaysFlowImpersonationPolicy` element has been set to true (``). Setting the `alwaysFlowImpersonationPolicy` element to true specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed. For more information on flowing unmanaged impersonation across asynchronous points, see [\ Element](alwaysflowimpersonationpolicy-element.md). - - You can alter this default behavior in two other ways: - -1. In managed code on a per-thread basis. - - You can suppress the flow on a per-thread basis by modifying the and settings by using the , or method. - -2. In the call to the unmanaged hosting interface to load the common language runtime (CLR). - - If an unmanaged hosting interface (instead of a simple managed executable) is used to load the CLR, you can specify a special flag in the call to the [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) function. To enable the compatibility mode for the entire process, set the `flags` parameter for [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) to STARTUP_LEGACY_IMPERSONATION. - - For more information, see the [\ Element](alwaysflowimpersonationpolicy-element.md). - -## Configuration File - - In a .NET Framework application, this element can be used only in the application configuration file. - - For an ASP.NET application, the impersonation flow can be configured in the aspnet.config file found in the \\Microsoft.NET\Framework\vx.x.xxxx directory. - - ASP.NET by default disables the impersonation flow in the aspnet.config file by using the following configuration settings: - +> The common language runtime (CLR) is aware of impersonation operations performed using only managed code, not of impersonation performed outside of managed code, such as through platform invoke to unmanaged code or through direct calls to Win32 functions. Only managed objects can flow across asynchronous points, unless the `alwaysFlowImpersonationPolicy` element has been set to true (``). Setting the `alwaysFlowImpersonationPolicy` element to true specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed. For more information on flowing unmanaged impersonation across asynchronous points, see [`` Element](alwaysflowimpersonationpolicy-element.md). + + You can alter this default behavior in two other ways: + +1. In managed code on a per-thread basis. + + You can suppress the flow on a per-thread basis by modifying the and settings by using the , or method. + +2. In the call to the unmanaged hosting interface to load the common language runtime (CLR). + + If an unmanaged hosting interface (instead of a simple managed executable) is used to load the CLR, you can specify a special flag in the call to the [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) function. To enable the compatibility mode for the entire process, set the `flags` parameter for [CorBindToRuntimeEx Function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md) to STARTUP_LEGACY_IMPERSONATION. + + For more information, see the [`` Element](alwaysflowimpersonationpolicy-element.md). + +## Configuration File + + In a .NET Framework application, this element can be used only in the application configuration file. + + For an ASP.NET application, the impersonation flow can be configured in the aspnet.config file found in the \\Microsoft.NET\Framework\vx.x.xxxx directory. + + ASP.NET by default disables the impersonation flow in the aspnet.config file by using the following configuration settings: + ``` xml - - - - - - -``` - - In ASP.NET, if you want to allow the flow of impersonation instead, you must explicitly use the following configuration settings: - -```xml - - - - - - -``` - -## Example - - The following example shows how to specify the legacy behavior that does not flow the Windows identity across asynchronous points. - -```xml - - - - - -``` - + + + + + + +``` + + In ASP.NET, if you want to allow the flow of impersonation instead, you must explicitly use the following configuration settings: + +```xml + + + + + + +``` + +## Example + + The following example shows how to specify the legacy behavior that does not flow the Windows identity across asynchronous points. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) - [Runtime Settings Schema](index.md) - [Configuration File Schema](../index.md) -- [\ Element](alwaysflowimpersonationpolicy-element.md) +- [`` Element](alwaysflowimpersonationpolicy-element.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md b/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md index 0076697875551..706751a533782 100644 --- a/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md @@ -7,7 +7,7 @@ helpviewer_keywords: - " element" ms.assetid: 006d1280-2ac3-4db6-a984-a3d4e275046a --- -# \ element +# `` element Specifies whether assemblies loaded from remote sources should be granted full trust in .NET Framework 4 and later. diff --git a/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md index 4ea2ccdf510dc..5b6aa49d4a532 100644 --- a/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md @@ -2,98 +2,98 @@ description: "Learn more about: Element (Cache Settings)" title: " Element (Cache Settings)" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element" - "caching [.NET Framework], configuration" - "memoryCache element" ms.assetid: 182a622f-f7cf-472d-9d0b-451d2fd94525 --- -# \ Element (Cache Settings) +# `` Element (Cache Settings) + +Defines an element that is used to configure a cache that is based on the class. The class defines a [memoryCache](memorycache-element-cache-settings.md) element that you can use to configure the cache. Multiple instances of the class can be used in a single application. Each `memoryCache` element in the configuration file can contain settings for a named instance. -Defines an element that is used to configure a cache that is based on the class. The class defines a [memoryCache](memorycache-element-cache-settings.md) element that you can use to configure the cache. Multiple instances of the class can be used in a single application. Each `memoryCache` element in the configuration file can contain settings for a named instance. - [**\**](../configuration-element.md)\   [**\**](system-runtime-caching-element-cache-settings.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml - - + + - -``` - -## Type - - class. - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`CacheMemoryLimitMegabytes`|The maximum memory size, in megabytes, that an instance of a object can grow to. The default value is 0, which means that the class's autosize heuristics are used by default. (This setting is only effective on .Net Framework.)| -|`Name`|The name of the cache configuration.| -|`PhysicalMemoryLimitPercentage`|percentage of total physical memory usage on the system (by all processes) at which the cache will begin to evict entries. The default value is 0, which means that the class's autosize heuristics are used by default.| -|`PollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. The value is entered in "HH:MM:SS" format.| - -### Child Elements - -|Element|Description| -|-------------|-----------------| -|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the `namedCache` instance.| - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|[\](../configuration-element.md)|Specifies the root element in every configuration file that is used by the common language runtime and .NET Framework applications.| -|[\](system-runtime-caching-element-cache-settings.md)|Contains types that let you implement output caching in applications that are built into the .NET Framework.| - -## Remarks - - The class is a concrete implementation of the abstract class. Instances of the class can be supplied with configuration information from application configuration files. The [memoryCache](memorycache-element-cache-settings.md) configuration section contains a `namedCaches` configuration collection. - - When a memory-based cache object is initialized, it first tries to find a `namedCaches` entry that matches the name in the parameter that is passed to the memory cache constructor. If a `namedCaches` entry is found, the polling and memory-management information are retrieved from the configuration file. - - The initialization process then determines whether any configuration entries were overridden, by using the optional collection of name/value pairs of configuration information in the constructor. If you pass any one of the following values in the name/value pair collection, these values override information obtained from the configuration file: - -- - -- - -- - -## Example - - The following example shows how to set the name of the object to the default cache object name by setting the `name` attribute to "Default". - - The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryLimitPercentage` attribute are set to zero. Setting these attributes to zero means that the autosizing heuristics are used by default. The cache implementation should compare the current memory load against the absolute and percentage-based memory limits every two minutes. - -```xml - - - - + +``` + +## Type + + class. + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`CacheMemoryLimitMegabytes`|The maximum memory size, in megabytes, that an instance of a object can grow to. The default value is 0, which means that the class's autosize heuristics are used by default. (This setting is only effective on .Net Framework.)| +|`Name`|The name of the cache configuration.| +|`PhysicalMemoryLimitPercentage`|percentage of total physical memory usage on the system (by all processes) at which the cache will begin to evict entries. The default value is 0, which means that the class's autosize heuristics are used by default.| +|`PollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. The value is entered in "HH:MM:SS" format.| + +### Child Elements + +|Element|Description| +|-------------|-----------------| +|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the `namedCache` instance.| + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|[\](../configuration-element.md)|Specifies the root element in every configuration file that is used by the common language runtime and .NET Framework applications.| +|[\](system-runtime-caching-element-cache-settings.md)|Contains types that let you implement output caching in applications that are built into the .NET Framework.| + +## Remarks + + The class is a concrete implementation of the abstract class. Instances of the class can be supplied with configuration information from application configuration files. The [memoryCache](memorycache-element-cache-settings.md) configuration section contains a `namedCaches` configuration collection. + + When a memory-based cache object is initialized, it first tries to find a `namedCaches` entry that matches the name in the parameter that is passed to the memory cache constructor. If a `namedCaches` entry is found, the polling and memory-management information are retrieved from the configuration file. + + The initialization process then determines whether any configuration entries were overridden, by using the optional collection of name/value pairs of configuration information in the constructor. If you pass any one of the following values in the name/value pair collection, these values override information obtained from the configuration file: + +- + +- + +- + +## Example + + The following example shows how to set the name of the object to the default cache object name by setting the `name` attribute to "Default". + + The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryLimitPercentage` attribute are set to zero. Setting these attributes to zero means that the autosizing heuristics are used by default. The cache implementation should compare the current memory load against the absolute and percentage-based memory limits every two minutes. + +```xml + + + + - - - - -``` - + physicalMemoryLimitPercentage="0" + pollingInterval="00:02:00" /> + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) - -- [\ Element (Cache Settings)](system-runtime-caching-element-cache-settings.md) -- [\ Element (Cache Settings)](namedcaches-element-cache-settings.md) +- [`` Element (Cache Settings)](system-runtime-caching-element-cache-settings.md) +- [`` Element (Cache Settings)](namedcaches-element-cache-settings.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md index 4eb767c890134..83c9b03803443 100644 --- a/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md @@ -2,94 +2,94 @@ description: "Learn more about: Element (Cache Settings)" title: " Element (Cache Settings)" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "namedCaches element" - "caching [.NET Framework], configuration" - " element" ms.assetid: 6bd4fbc5-55a6-4dc4-998b-cdcc7e023330 --- -# \ Element (Cache Settings) +# `` Element (Cache Settings) + +Specifies a collection of configuration settings for the named instances. The property references the collection of configuration settings from one or more `namedCaches` elements of the configuration file. -Specifies a collection of configuration settings for the named instances. The property references the collection of configuration settings from one or more `namedCaches` elements of the configuration file. - [**\**](../configuration-element.md)\   [**\**](system-runtime-caching-element-cache-settings.md)\     [**\**](memorycache-element-cache-settings.md)\ -      **\** - -## Syntax - -```xml - +      **\** + +## Syntax + +```xml + - -``` - -## Type - - `None` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`cacheMemoryLimitMegabytes`|An integer value that specifies the maximum allowable size, in megabytes, that an instance of a can grow to. The default value is 0, which means that the autosizing heuristics of the class are used by default.| -|`name`|The name of the cache.| -|`physicalMemoryLimitPercentage`|An integer value between 0 and 100 that specifies the maximum percentage of physically installed computer memory that can be consumed by the cache. The default value is 0, which means that the autosizing heuristics of the class are used by default.| -|`pollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. This value is entered in "HH:MM:SS" format.| - -### Child Elements - -|Element|Description| -|-------------|-----------------| -|[\](add-element-for-namedcaches.md)|Adds a named cache to the `namedCaches` collection for a memory cache.| -|[\](clear-element-for-namedcaches.md)|Clears the `namedCaches` collection for a memory cache.| -|[\](remove-element-for-namedcaches.md)|Removes a named cache entry from the `namedCaches` collection for a memory cache.| - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|[\](../configuration-element.md)|Specifies the root element in every configuration file that is used by the common language runtime and .NET Framework applications.| -|[\](memorycache-element-cache-settings.md)|Defines an element that is used to configure a cache that is based on the class.| -|[\](system-runtime-caching-element-cache-settings.md)|Contains types that let you implement output caching in applications that are built into the .NET Framework.| - -## Remarks - - The memory cache configuration section of the Web.config file can contain `add`, `remove`, and `clear` attributes for the `namedCaches` collection. Each `namedCaches` entry is uniquely identified by the `name` attribute. - - You can retrieve instances of memory cache entries by referencing the information in the application configuration files. By default, only the default cache instance has an entry in the configuration file. The default cache instance is the instance that is returned from the property. - - If you set the name attribute to "Default", the element uses the default memory cache instance. - -## Example - - The following example shows how to set the name of the cache to the default cache entry name by setting the `name` attribute to "Default". - - The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryPercentage` attribute are set to zero. Setting these attributes to zero means that the autosizing heuristics of the class are used. The cache implementation compares the current memory load against the absolute and percentage-based memory limits every two minutes. - -```xml - - - - - + +``` + +## Type + + `None` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`cacheMemoryLimitMegabytes`|An integer value that specifies the maximum allowable size, in megabytes, that an instance of a can grow to. The default value is 0, which means that the autosizing heuristics of the class are used by default.| +|`name`|The name of the cache.| +|`physicalMemoryLimitPercentage`|An integer value between 0 and 100 that specifies the maximum percentage of physically installed computer memory that can be consumed by the cache. The default value is 0, which means that the autosizing heuristics of the class are used by default.| +|`pollingInterval`|A value that indicates the time interval after which the cache implementation compares the current memory load against the absolute and percentage-based memory limits that are set for the cache instance. This value is entered in "HH:MM:SS" format.| + +### Child Elements + +|Element|Description| +|-------------|-----------------| +|[\](add-element-for-namedcaches.md)|Adds a named cache to the `namedCaches` collection for a memory cache.| +|[\](clear-element-for-namedcaches.md)|Clears the `namedCaches` collection for a memory cache.| +|[\](remove-element-for-namedcaches.md)|Removes a named cache entry from the `namedCaches` collection for a memory cache.| + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|[\](../configuration-element.md)|Specifies the root element in every configuration file that is used by the common language runtime and .NET Framework applications.| +|[\](memorycache-element-cache-settings.md)|Defines an element that is used to configure a cache that is based on the class.| +|[\](system-runtime-caching-element-cache-settings.md)|Contains types that let you implement output caching in applications that are built into the .NET Framework.| + +## Remarks + + The memory cache configuration section of the Web.config file can contain `add`, `remove`, and `clear` attributes for the `namedCaches` collection. Each `namedCaches` entry is uniquely identified by the `name` attribute. + + You can retrieve instances of memory cache entries by referencing the information in the application configuration files. By default, only the default cache instance has an entry in the configuration file. The default cache instance is the instance that is returned from the property. + + If you set the name attribute to "Default", the element uses the default memory cache instance. + +## Example + + The following example shows how to set the name of the cache to the default cache entry name by setting the `name` attribute to "Default". + + The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryPercentage` attribute are set to zero. Setting these attributes to zero means that the autosizing heuristics of the class are used. The cache implementation compares the current memory load against the absolute and percentage-based memory limits every two minutes. + +```xml + + + + + - - - - - -``` - + physicalMemoryLimitPercentage="0" + pollingInterval="00:02:00" /> + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element (Cache Settings)](memorycache-element-cache-settings.md) +- [`` Element (Cache Settings)](memorycache-element-cache-settings.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/netfx40-legacysecuritypolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/netfx40-legacysecuritypolicy-element.md index e541e94682f2b..012ed333c88c0 100644 --- a/docs/framework/configure-apps/file-schema/runtime/netfx40-legacysecuritypolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/netfx40-legacysecuritypolicy-element.md @@ -7,7 +7,7 @@ helpviewer_keywords: - "NetFx40_LegacySecurityPolicy element" ms.assetid: 07132b9c-4a72-4710-99d7-e702405e02d4 --- -# \ Element +# `` Element Specifies whether the runtime uses legacy code access security (CAS) policy. @@ -64,7 +64,7 @@ Applying the `` element to a .NET Framework 4 asse > Applying the `` element can result in significant performance penalties for native image assemblies created by the [Native Image Generator (Ngen.exe)](../../../tools/ngen-exe-native-image-generator.md) that are not installed in the [global assembly cache](../../../app-domains/gac.md). The performance degradation is caused by the inability of the runtime to load the assemblies as native images when the attribute is applied, resulting in their being loaded as just-in-time assemblies. > [!NOTE] -> If you specify a target .NET Framework version that is earlier than the .NET Framework 4 in the project settings for your Visual Studio project, CAS policy will be enabled, including any custom CAS policies you specified for that version. However, you will not be able to use new .NET Framework 4 types and members. You can also specify an earlier version of the .NET Framework by using the [\ element](../startup/supportedruntime-element.md) in the startup settings schema in your [application configuration file](../../index.md). +> If you specify a target .NET Framework version that is earlier than the .NET Framework 4 in the project settings for your Visual Studio project, CAS policy will be enabled, including any custom CAS policies you specified for that version. However, you will not be able to use new .NET Framework 4 types and members. You can also specify an earlier version of the .NET Framework by using the [`` element](../startup/supportedruntime-element.md) in the startup settings schema in your [application configuration file](../../index.md). > [!NOTE] > Configuration file syntax is case-sensitive. You should use the syntax as provided in the Syntax and Example sections. diff --git a/docs/framework/configure-apps/file-schema/runtime/netfx40-pinvokestackresilience-element.md b/docs/framework/configure-apps/file-schema/runtime/netfx40-pinvokestackresilience-element.md index 6a8a5cfa9fd26..20d039b9f6517 100644 --- a/docs/framework/configure-apps/file-schema/runtime/netfx40-pinvokestackresilience-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/netfx40-pinvokestackresilience-element.md @@ -7,7 +7,7 @@ helpviewer_keywords: - "NetFx40_PInvokeStackResilience element" ms.assetid: 39fb1588-72a4-4479-af74-0605233b68bd --- -# \ Element +# `` Element Specifies whether the runtime automatically fixes incorrect platform invoke declarations at run time, at the cost of slower transitions between managed and unmanaged code. diff --git a/docs/framework/configure-apps/file-schema/runtime/netfx45-cultureawarecomparergethashcode-longstrings-element.md b/docs/framework/configure-apps/file-schema/runtime/netfx45-cultureawarecomparergethashcode-longstrings-element.md index 5d39728b2f797..e3cdf4d9e44a4 100644 --- a/docs/framework/configure-apps/file-schema/runtime/netfx45-cultureawarecomparergethashcode-longstrings-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/netfx45-cultureawarecomparergethashcode-longstrings-element.md @@ -9,13 +9,13 @@ helpviewer_keywords: - "hash codes, calculating" ms.assetid: 3a5f38d1-ebc8-44de-aaeb-2929f6e6b48f --- -# \ Element +# `` Element Specifies whether the runtime uses a fixed amount of memory to calculate hash codes for the method. [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** +    **\** ## Syntax diff --git a/docs/framework/configure-apps/file-schema/runtime/prefercominsteadofmanagedremoting-element.md b/docs/framework/configure-apps/file-schema/runtime/prefercominsteadofmanagedremoting-element.md index d0b627421512d..3cd3cfbf423cf 100644 --- a/docs/framework/configure-apps/file-schema/runtime/prefercominsteadofmanagedremoting-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/prefercominsteadofmanagedremoting-element.md @@ -2,75 +2,75 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element" - "PreferComInsteadOfManagedRemoting element" ms.assetid: a279a42a-c415-4e79-88cf-64244ebda613 --- -# \ Element +# `` Element + +Specifies whether the runtime will use COM interop instead of remoting for all calls across application domain boundaries. -Specifies whether the runtime will use COM interop instead of remoting for all calls across application domain boundaries. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Indicates whether the runtime will use COM interop instead of remoting across application domain boundaries.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`false`|The runtime will use remoting across application domain boundaries. This is the default.| -|`true`|The runtime will use COM interop across application domain boundaries.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - When you set the `enabled` attribute to `true`, the runtime behaves as follows: - -- The runtime does not call [IUnknown::QueryInterface](/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)) for an [IManagedObject](../../../unmanaged-api/hosting/imanagedobject-interface.md) interface when an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface enters the domain through a COM interface. Instead, it constructs a [Runtime Callable Wrapper](../../../../standard/native-interop/runtime-callable-wrapper.md) (RCW) around the object. - -- The runtime returns E_NOINTERFACE when it receives a `QueryInterface` call for an [IManagedObject](../../../unmanaged-api/hosting/imanagedobject-interface.md) interface for any [COM Callable Wrapper](../../../../standard/native-interop/com-callable-wrapper.md) (CCW) that has been created in this domain. - - These two behaviors ensure that all calls over COM interfaces between managed objects across application domain boundaries use COM and COM interop instead of remoting. - -## Example - - The following example shows how to specify that the runtime should use COM interop across isolation boundaries: - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Indicates whether the runtime will use COM interop instead of remoting across application domain boundaries.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`false`|The runtime will use remoting across application domain boundaries. This is the default.| +|`true`|The runtime will use COM interop across application domain boundaries.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + When you set the `enabled` attribute to `true`, the runtime behaves as follows: + +- The runtime does not call [IUnknown::QueryInterface](/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)) for an [IManagedObject](../../../unmanaged-api/hosting/imanagedobject-interface.md) interface when an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface enters the domain through a COM interface. Instead, it constructs a [Runtime Callable Wrapper](../../../../standard/native-interop/runtime-callable-wrapper.md) (RCW) around the object. + +- The runtime returns E_NOINTERFACE when it receives a `QueryInterface` call for an [IManagedObject](../../../unmanaged-api/hosting/imanagedobject-interface.md) interface for any [COM Callable Wrapper](../../../../standard/native-interop/com-callable-wrapper.md) (CCW) that has been created in this domain. + + These two behaviors ensure that all calls over COM interfaces between managed objects across application domain boundaries use COM and COM interop instead of remoting. + +## Example + + The following example shows how to specify that the runtime should use COM interop across isolation boundaries: + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/probing-element.md b/docs/framework/configure-apps/file-schema/runtime/probing-element.md index 4cb3008f1179d..a319cbe72bb0b 100644 --- a/docs/framework/configure-apps/file-schema/runtime/probing-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/probing-element.md @@ -2,66 +2,66 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/probing" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#probing" -helpviewer_keywords: +helpviewer_keywords: - " element" - "container tags, element" - "probing element" ms.assetid: 09c80fc9-1ba5-4192-89f7-3a79b2e4b024 --- -# \ Element +# `` Element + +Specifies application base subdirectories for the common language runtime to search when loading assemblies. -Specifies application base subdirectories for the common language runtime to search when loading assemblies. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\ -      **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`privatePath`|Required attribute.

Specifies subdirectories of the application's base directory that might contain assemblies. Delimit each subdirectory with a semicolon.| - -### Child Elements - -None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Example - - The following example shows how to specify application base subdirectories the runtime should search for assemblies. - -```xml - - - - - - - -``` - +      **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`privatePath`|Required attribute.

Specifies subdirectories of the application's base directory that might contain assemblies. Delimit each subdirectory with a semicolon.| + +### Child Elements + +None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Example + + The following example shows how to specify application base subdirectories the runtime should search for assemblies. + +```xml + + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/publisherpolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/publisherpolicy-element.md index 43ca25ec3b6fa..ce957a00466b7 100644 --- a/docs/framework/configure-apps/file-schema/runtime/publisherpolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/publisherpolicy-element.md @@ -2,89 +2,89 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/publisherPolicy" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/dependentAssembly/publisherPolicy" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#publisherPolicy" -helpviewer_keywords: +helpviewer_keywords: - "publisherPolicy element" - "container tags, element" - " element" ms.assetid: 4613407e-d0a8-4ef2-9f81-a6acb9fdc7d4 --- -# \ Element +# `` Element + +Specifies whether the runtime applies publisher policy. -Specifies whether the runtime applies publisher policy. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\       [**\**](dependentassembly-element.md)\ -        **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`apply`|Specifies whether to apply publisher policy.| - -## apply Attribute - -|Value|Description| -|-----------|-----------------| -|`yes`|Applies publisher policy. This is the default setting.| -|`no`|Does not apply publisher policy.| - -### Child Elements - -None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`dependentAssembly`|Encapsulates binding policy and assembly location for each assembly. Use one `` element for each assembly.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - When a component vendor releases a new version of an assembly, the vendor can include a publisher policy so applications that use the old version now use the new version. To specify whether to apply publisher policy for a particular assembly, put the **\** element in the **\** element. - - The default setting for the **apply** attribute is **yes**. Setting the **apply** attribute to **no** overrides any previous **yes** settings for an assembly. - - Permission is required for an application to explicitly ignore publisher policy using the [\](publisherpolicy-element.md) element in the application configuration file. The permission is granted by setting the flag on the . For more information, see [Assembly Binding Redirection Security Permission](../../assembly-binding-redirection-security-permission.md). - -## Example - - The following example turns off publisher policy for the assembly, `myAssembly`. - -```xml - - - - - - - - - - -``` - +        **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`apply`|Specifies whether to apply publisher policy.| + +## apply Attribute + +|Value|Description| +|-----------|-----------------| +|`yes`|Applies publisher policy. This is the default setting.| +|`no`|Does not apply publisher policy.| + +### Child Elements + +None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`dependentAssembly`|Encapsulates binding policy and assembly location for each assembly. Use one `` element for each assembly.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + When a component vendor releases a new version of an assembly, the vendor can include a publisher policy so applications that use the old version now use the new version. To specify whether to apply publisher policy for a particular assembly, put the `` element in the `` element. + + The default setting for the `apply` attribute is **yes**. Setting the `apply` attribute to `no` overrides any previous `yes` settings for an assembly. + + Permission is required for an application to explicitly ignore publisher policy using the [\](publisherpolicy-element.md) element in the application configuration file. The permission is granted by setting the flag on the . For more information, see [Assembly Binding Redirection Security Permission](../../assembly-binding-redirection-security-permission.md). + +## Example + + The following example turns off publisher policy for the assembly, `myAssembly`. + +```xml + + + + + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md b/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md index 6aa83cac437d1..ac1905753a43b 100644 --- a/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md @@ -2,77 +2,77 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -f1_keywords: +f1_keywords: - "http://schemas.microsoft.com/.NetConfiguration/v2.0#qualifyAssembly" - "http://schemas.microsoft.com/.NetConfiguration/v2.0#configuration/runtime/assemblyBinding/qualifyAssembly" -helpviewer_keywords: +helpviewer_keywords: - "container tags, element" - " element" - "qualifyAssembly element" ms.assetid: ad6442f6-1a9d-43b6-b733-04ac1b7f9b82 --- -# \ Element +# `` Element + +Specifies the full name of the assembly that should be dynamically loaded when a partial name is used. -Specifies the full name of the assembly that should be dynamically loaded when a partial name is used. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\ -      **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`partialName`|Required attribute.

Specifies the partial name of the assembly as it appears in the code.| -|`fullName`|Required attribute.

Specifies the full name of the assembly as it appears in the global assembly cache.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Calling the method using partial assembly names causes the common language runtime to look for the assembly only in the application base directory. Use the **\** element in your application configuration file to provide the full assembly information (name, version, public key token, and culture) and cause the common language runtime to search for the assembly in the global assembly cache. - - The **fullName** attribute must include the four fields of assembly identity: name, version, public key token, and culture. The **partialName** attribute must partially reference an assembly. You must specify at least the assembly's text name (the most common case), but you can also include version, public key token, or culture (or any combination of the four, but not all four). The **partialName** must match the name specified in your call. For example, you cannot specify `"math"` as the **partialName** attribute in your configuration file and call `Assembly.Load("math, Version=3.3.3.3")` in your code. - -## Example - - The following example logically turns the call `Assembly.Load("math")` into `Assembly.Load("math,version=1.0.0.0,publicKeyToken=a1690a5ea44bab32,culture=neutral")`. - -```xml - - - +      **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`partialName`|Required attribute.

Specifies the partial name of the assembly as it appears in the code.| +|`fullName`|Required attribute.

Specifies the full name of the assembly as it appears in the global assembly cache.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Calling the method using partial assembly names causes the common language runtime to look for the assembly only in the application base directory. Use the `` element in your application configuration file to provide the full assembly information (name, version, public key token, and culture) and cause the common language runtime to search for the assembly in the global assembly cache. + + The `fullName` attribute must include the four fields of assembly identity: name, version, public key token, and culture. The `partialName` attribute must partially reference an assembly. You must specify at least the assembly's text name (the most common case), but you can also include version, public key token, or culture (or any combination of the four, but not all four). The `partialName` must match the name specified in your call. For example, you cannot specify `"math"` as the `partialName` attribute in your configuration file and call `Assembly.Load("math, Version=3.3.3.3")` in your code. + +## Example + + The following example logically turns the call `Assembly.Load("math")` into `Assembly.Load("math,version=1.0.0.0,publicKeyToken=a1690a5ea44bab32,culture=neutral")`. + +```xml + + + - - - -``` - + fullName= +"math,version=1.0.0.0,publicKeyToken=a1690a5ea44bab32,culture=neutral"/> +
+
+
+``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md b/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md index 1a44e78565c26..65b2bcb505e10 100644 --- a/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md @@ -8,7 +8,7 @@ helpviewer_keywords: ms.assetid: 846ffa47-7257-4ce3-8cac-7ff627e0e34f --- -# \ Element +# `` Element Optimizes the probe for satellite assemblies. diff --git a/docs/framework/configure-apps/file-schema/runtime/remove-element-for-namedcaches.md b/docs/framework/configure-apps/file-schema/runtime/remove-element-for-namedcaches.md index 17742b00a2dd1..264177ef31356 100644 --- a/docs/framework/configure-apps/file-schema/runtime/remove-element-for-namedcaches.md +++ b/docs/framework/configure-apps/file-schema/runtime/remove-element-for-namedcaches.md @@ -2,57 +2,57 @@ description: "Learn more about: Element for " title: " Element for " ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "remove element for namedCaches" - " element for namedCaches" ms.assetid: 24211ea5-163e-4fe5-aed8-004d8499760c --- -# \ Element for \ +# `` Element for \ + +Removes a named cache entry from the `namedCaches` collection for a memory cache. -Removes a named cache entry from the `namedCaches` collection for a memory cache. - [**\**](../configuration-element.md)\   [**\**](system-runtime-caching-element-cache-settings.md)\     [**\**](memorycache-element-cache-settings.md)\       [**\**](namedcaches-element-cache-settings.md)\ -        **\** - -## Syntax - -```xml - - - - -``` - -## Type - - `None` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - - `None` - -### Child Elements - - `None` - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the named instances.| - -## Remarks - - The `remove` element removes a `namedCache` entry from the named cache collection for a memory cache. - +        **\** + +## Syntax + +```xml + + + + +``` + +## Type + + `None` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + + `None` + +### Child Elements + + `None` + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|[\](namedcaches-element-cache-settings.md)|Contains a collection of configuration settings for the named instances.| + +## Remarks + + The `remove` element removes a `namedCache` entry from the named cache collection for a memory cache. + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element (Cache Settings)](namedcaches-element-cache-settings.md) +- [`` Element (Cache Settings)](namedcaches-element-cache-settings.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/runtime-element.md b/docs/framework/configure-apps/file-schema/runtime/runtime-element.md index 9b2fba1179248..68040ff85ddcb 100644 --- a/docs/framework/configure-apps/file-schema/runtime/runtime-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/runtime-element.md @@ -11,7 +11,7 @@ helpviewer_keywords: - "container tags, element" ms.assetid: 1eb2fae3-de4b-45b6-852f-517c39b751bd --- -# \ Element +# `` Element Provides information used by the common language runtime to configure applications. diff --git a/docs/framework/configure-apps/file-schema/runtime/shadowcopyverifybytimestamp-element.md b/docs/framework/configure-apps/file-schema/runtime/shadowcopyverifybytimestamp-element.md index 9013f32b4a805..e4f7bc42fb067 100644 --- a/docs/framework/configure-apps/file-schema/runtime/shadowcopyverifybytimestamp-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/shadowcopyverifybytimestamp-element.md @@ -2,69 +2,69 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element" - "shadowCopyTimeStampVerification element" ms.assetid: 2f1648e5-997b-435e-a4f9-d236c574c66c --- -# \ Element +# `` Element + +Specifies whether shadow copying uses the default startup behavior introduced in the .NET Framework 4, or reverts to the startup behavior of earlier versions of the .NET Framework. -Specifies whether shadow copying uses the default startup behavior introduced in the .NET Framework 4, or reverts to the startup behavior of earlier versions of the .NET Framework. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether application domains that use shadow copying compare assembly time stamps when starting up, to determine whether an assembly has been updated before shadow copying the assembly.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|true|At startup, copies only assemblies that have been updated since they were last copied to the shadow copy directory. This is the default for the .NET Framework 4.| -|false|Reverts to the startup behavior of previous versions of the .NET Framework, which was to copy all files at startup.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - Starting with the .NET Framework 4, assemblies are shadow copied only if their time stamps indicate that they have changed since they were last copied to the shadow copy directory. This improves startup times for many applications that use shadow copying, as described in [Shadow Copying Assemblies](../../../app-domains/shadow-copy-assemblies.md). Applications that have a high percentage and frequency of assembly updates might not benefit from this change in behavior. In that case, you can use this element to restore the behavior of previous versions of the .NET Framework. - -## Example - - The following example shows how to disable the default startup behavior of shadow copying in the .NET Framework 4, and revert to the startup behavior of previous versions of the .NET Framework. - -```xml - - - - - -``` - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether application domains that use shadow copying compare assembly time stamps when starting up, to determine whether an assembly has been updated before shadow copying the assembly.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|true|At startup, copies only assemblies that have been updated since they were last copied to the shadow copy directory. This is the default for the .NET Framework 4.| +|false|Reverts to the startup behavior of previous versions of the .NET Framework, which was to copy all files at startup.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + Starting with the .NET Framework 4, assemblies are shadow copied only if their time stamps indicate that they have changed since they were last copied to the shadow copy directory. This improves startup times for many applications that use shadow copying, as described in [Shadow Copying Assemblies](../../../app-domains/shadow-copy-assemblies.md). Applications that have a high percentage and frequency of assembly updates might not benefit from this change in behavior. In that case, you can use this element to restore the behavior of previous versions of the .NET Framework. + +## Example + + The following example shows how to disable the default startup behavior of shadow copying in the .NET Framework 4, and revert to the startup behavior of previous versions of the .NET Framework. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/supportportability-element.md b/docs/framework/configure-apps/file-schema/runtime/supportportability-element.md index a8975846e8fea..0b04b788a5333 100644 --- a/docs/framework/configure-apps/file-schema/runtime/supportportability-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/supportportability-element.md @@ -2,80 +2,80 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "supportPortability element" - " element" ms.assetid: 6453ef66-19b4-41f3-b712-52d0c2abc9ca --- -# \ Element +# `` Element + +Specifies that an application can reference the same assembly in two different implementations of the .NET Framework, by disabling the default behavior that treats the assemblies as equivalent for application portability purposes. -Specifies that an application can reference the same assembly in two different implementations of the .NET Framework, by disabling the default behavior that treats the assemblies as equivalent for application portability purposes. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\     [**\**](assemblybinding-element-for-runtime.md)\ -      **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - -The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|PKT|Required attribute.

Specifies the public key token of the affected assembly, as a string.| -|enabled|Optional attribute.

Specifies whether support for portability between implementations of the specified .NET Framework assembly should be enabled.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|true|Enable support for portability between implementations of the specified .NET Framework assembly. This is the default.| -|false|Disable support for portability between implementations of the specified .NET Framework assembly. This enables the application to have references to multiple implementations of the specified assembly.| - -### Child Elements - -None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| -|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| - -## Remarks - -Beginning with the .NET Framework 4, support is automatically provided for applications that can use either of two implementations of the .NET Framework, for example either the .NET Framework implementation or the .NET Framework for Silverlight implementation. The two implementations of a particular .NET Framework assembly are seen as equivalent by the assembly binder. In a few scenarios, this application portability feature causes problems. In those scenarios, the `` element can be used to disable the feature. - -One such scenario is an assembly that has to reference both the .NET Framework implementation and the .NET Framework for Silverlight implementation of a particular reference assembly. For example, a XAML designer written in Windows Presentation Foundation (WPF) might need to reference both the WPF Desktop implementation, for the designer's user interface, and the subset of WPF that is included in the Silverlight implementation. By default, the separate references cause a compiler error, because assembly binding sees the two assemblies as equivalent. This element disables the default behavior, and allows compilation to succeed. - +      **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + +The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|PKT|Required attribute.

Specifies the public key token of the affected assembly, as a string.| +|enabled|Optional attribute.

Specifies whether support for portability between implementations of the specified .NET Framework assembly should be enabled.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|true|Enable support for portability between implementations of the specified .NET Framework assembly. This is the default.| +|false|Disable support for portability between implementations of the specified .NET Framework assembly. This enables the application to have references to multiple implementations of the specified assembly.| + +### Child Elements + +None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| +|`assemblyBinding`|Contains information about assembly version redirection and the locations of assemblies.| + +## Remarks + +Beginning with the .NET Framework 4, support is automatically provided for applications that can use either of two implementations of the .NET Framework, for example either the .NET Framework implementation or the .NET Framework for Silverlight implementation. The two implementations of a particular .NET Framework assembly are seen as equivalent by the assembly binder. In a few scenarios, this application portability feature causes problems. In those scenarios, the `` element can be used to disable the feature. + +One such scenario is an assembly that has to reference both the .NET Framework implementation and the .NET Framework for Silverlight implementation of a particular reference assembly. For example, a XAML designer written in Windows Presentation Foundation (WPF) might need to reference both the WPF Desktop implementation, for the designer's user interface, and the subset of WPF that is included in the Silverlight implementation. By default, the separate references cause a compiler error, because assembly binding sees the two assemblies as equivalent. This element disables the default behavior, and allows compilation to succeed. + > [!IMPORTANT] -> In order for the compiler to pass the information to the common language runtime's assembly-binding logic, you must use the `/appconfig` compiler option to specify the location of the app.config file that contains this element. - -## Example - -The following example enables an application to have references to both the .NET Framework implementation and the .NET Framework for Silverlight implementation of any .NET Framework assembly that exists in both implementations. The `/appconfig` compiler option must be used to specify the location of this app.config file. - -```xml - - - - - - - - -``` - +> In order for the compiler to pass the information to the common language runtime's assembly-binding logic, you must use the `/appconfig` compiler option to specify the location of the app.config file that contains this element. + +## Example + +The following example enables an application to have references to both the .NET Framework implementation and the .NET Framework for Silverlight implementation of any .NET Framework assembly that exists in both implementations. The `/appconfig` compiler option must be used to specify the location of this app.config file. + +```xml + + + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md index d0a931d767b91..4bb8559dd2035 100644 --- a/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md @@ -2,76 +2,76 @@ description: "Learn more about: Element (Cache Settings)" title: " Element (Cache Settings)" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - " element" - "caching [.NET Framework], configuration" - "system.runtime.caching element" ms.assetid: 9b44daee-874a-4bd1-954e-83bf53565590 --- -# \ Element (Cache Settings) +# `` Element (Cache Settings) + +Provides configuration for the default in-memory implementation through the `memoryCache` entry in the configuration file. -Provides configuration for the default in-memory implementation through the `memoryCache` entry in the configuration file. - [**\**](../configuration-element.md)\ -  **\** - -## Syntax - -```xml - - - -``` - +  **\** + +## Syntax + +```xml + + + +``` + ## Attributes and Elements -The following sections describe attributes, child elements, and parent elements. - +The following sections describe attributes, child elements, and parent elements. + ### Attributes -`None` +`None` ### Child Elements -|Element|Description| -|-------------|-----------------| -|[\](memorycache-element-cache-settings.md)|Defines an element that is used to configure a cache that is based on the class.| - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|[\](../configuration-element.md)|Specifies the root element in every configuration file that is used by the common language runtime and .NET Framework applications.| - +|Element|Description| +|-------------|-----------------| +|[\](memorycache-element-cache-settings.md)|Defines an element that is used to configure a cache that is based on the class.| + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|[\](../configuration-element.md)|Specifies the root element in every configuration file that is used by the common language runtime and .NET Framework applications.| + ## Remarks -The classes in this namespace provide a way to use caching facilities like those in ASP.NET, but without a dependency on the `System.Web` assembly. For more information, see [Caching in .NET Framework Applications](../../../performance/caching-in-net-framework-applications.md). - +The classes in this namespace provide a way to use caching facilities like those in ASP.NET, but without a dependency on the `System.Web` assembly. For more information, see [Caching in .NET Framework Applications](../../../performance/caching-in-net-framework-applications.md). + > [!NOTE] -> The output caching functionality and types in the namespace are new in .NET Framework 4. - +> The output caching functionality and types in the namespace are new in .NET Framework 4. + ## Example -The following example shows how to configure a cache that is based on the class. The example shows how to configure an instance of the `namedCaches` entry for memory cache. The name of the cache is set to the default cache entry name by setting the `name` attribute to "Default". - -The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryPercentage` attribute are set to zero. Setting these attributes to zero means that the autosizing heuristics are used by default. The cache implementation should compare the current memory load against the absolute and percentage-based memory limits every two minutes. - -```xml - - - - +The following example shows how to configure a cache that is based on the class. The example shows how to configure an instance of the `namedCaches` entry for memory cache. The name of the cache is set to the default cache entry name by setting the `name` attribute to "Default". + +The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryPercentage` attribute are set to zero. Setting these attributes to zero means that the autosizing heuristics are used by default. The cache implementation should compare the current memory load against the absolute and percentage-based memory limits every two minutes. + +```xml + + + + - - - - -``` - + physicalMemoryLimitPercentage="0" + pollingInterval="00:02:00" /> + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element (Cache Settings)](memorycache-element-cache-settings.md) +- [`` Element (Cache Settings)](memorycache-element-cache-settings.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md b/docs/framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md index 32b75b270bad4..b6256d6e04e93 100644 --- a/docs/framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md @@ -4,13 +4,13 @@ title: " Element" ms.date: "03/30/2017" ms.assetid: d30fe7c5-8469-46e2-b804-e3eec7b24256 --- -# \ Element +# `` Element Specifies whether the runtime distributes managed threads across all CPU groups. [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** +    **\** ## Syntax @@ -70,4 +70,4 @@ The following example shows how to enable support for multiple CPU groups. - [Configure apps by using configuration files](../../index.md) - [Runtime Settings Schema](index.md) - [Configuration File Schema](../index.md) -- [\ Element](gccpugroup-element.md) +- [`` Element](gccpugroup-element.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md b/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md index 4bb0dd718ccf7..d5111c82f8107 100644 --- a/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md @@ -2,92 +2,92 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -dev_langs: +dev_langs: - "csharp" - "vb" -helpviewer_keywords: +helpviewer_keywords: - "ThrowUnobservedTaskExceptions element" - " element" ms.assetid: cea7e588-8b8d-48d2-9ad5-8feaf3642c18 --- -# \ Element +# `` Element + +Specifies whether unhandled task exceptions should terminate a running process. -Specifies whether unhandled task exceptions should terminate a running process. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies whether unhandled task exceptions should terminate the running process.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`false`|Does not terminate the running process for an unhandled task exception. This is the default.| -|`true`|Terminates the running process for an unhandled task exception.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies whether unhandled task exceptions should terminate the running process.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`false`|Does not terminate the running process for an unhandled task exception. This is the default.| +|`true`|Terminates the running process for an unhandled task exception.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| |`runtime`|Contains information about runtime initialization options.| - -## Remarks - - If an exception that is associated with a has not been observed, there is no operation, the parent is not attached, and the property was not read the task exception is considered to be unobserved. - - In the .NET Framework 4, by default, if a that has an unobserved exception is garbage collected, the finalizer throws an exception and terminates the process. The termination of the process is determined by the timing of garbage collection and finalization. - - To make it easier for developers to write asynchronous code based on tasks, the .NET Framework 4.5 changes this default behavior for unobserved exceptions. Unobserved exceptions still cause the event to be raised, but by default, the process does not terminate. Instead, the exception is ignored after the event is raised, regardless of whether an event handler observes the exception. - - In .NET Framework 4.5, you can use the [\ element](throwunobservedtaskexceptions-element.md) in an application configuration file to enable the .NET Framework 4 behavior of throwing an exception. - - You can also specify the exception behavior in one of the following ways: - -- By setting the environment variable `COMPlus_ThrowUnobservedTaskExceptions` (`set COMPlus_ThrowUnobservedTaskExceptions=1`). - -- By setting the registry DWORD value ThrowUnobservedTaskExceptions = 1 in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\\.NETFramework key. - + +## Remarks + + If an exception that is associated with a has not been observed, there is no operation, the parent is not attached, and the property was not read the task exception is considered to be unobserved. + + In the .NET Framework 4, by default, if a that has an unobserved exception is garbage collected, the finalizer throws an exception and terminates the process. The termination of the process is determined by the timing of garbage collection and finalization. + + To make it easier for developers to write asynchronous code based on tasks, the .NET Framework 4.5 changes this default behavior for unobserved exceptions. Unobserved exceptions still cause the event to be raised, but by default, the process does not terminate. Instead, the exception is ignored after the event is raised, regardless of whether an event handler observes the exception. + + In .NET Framework 4.5, you can use the [`` element](throwunobservedtaskexceptions-element.md) in an application configuration file to enable the .NET Framework 4 behavior of throwing an exception. + + You can also specify the exception behavior in one of the following ways: + +- By setting the environment variable `COMPlus_ThrowUnobservedTaskExceptions` (`set COMPlus_ThrowUnobservedTaskExceptions=1`). + +- By setting the registry DWORD value ThrowUnobservedTaskExceptions = 1 in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\\.NETFramework key. + ## Example 1 - The following example shows how to enable the throwing of exceptions in tasks by using an application configuration file. - -```xml + The following example shows how to enable the throwing of exceptions in tasks by using an application configuration file. + +```xml - -``` - -## Example 2 +
+``` + +## Example 2 + + The following example demonstrates how an unobserved exception is thrown from a task. The code must be run as a released program to work correctly. - The following example demonstrates how an unobserved exception is thrown from a task. The code must be run as a released program to work correctly. - [!code-csharp[ThrowUnobservedTaskExceptions#1](../../../../../samples/snippets/csharp/VS_Snippets_CLR/throwunobservedtaskexceptions/cs/program.cs#1)] - [!code-vb[ThrowUnobservedTaskExceptions#1](../../../../../samples/snippets/visualbasic/VS_Snippets_CLR/throwunobservedtaskexceptions/vb/program.vb#1)] - + [!code-vb[ThrowUnobservedTaskExceptions#1](../../../../../samples/snippets/visualbasic/VS_Snippets_CLR/throwunobservedtaskexceptions/vb/program.vb#1)] + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element.md b/docs/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element.md index d220bb884168a..33aff2479d3f9 100644 --- a/docs/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element.md @@ -10,7 +10,7 @@ helpviewer_keywords: - "TimeSpan_LegacyFormatMode element" ms.assetid: 865e7207-d050-4442-b574-57ea29d5e2d6 --- -# \ Element +# `` Element Determines whether the runtime preserves legacy behavior in formatting operations with values. diff --git a/docs/framework/configure-apps/file-schema/runtime/uselegacyjit-element.md b/docs/framework/configure-apps/file-schema/runtime/uselegacyjit-element.md index 5699b81ae60cd..37062572d4a71 100644 --- a/docs/framework/configure-apps/file-schema/runtime/uselegacyjit-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/uselegacyjit-element.md @@ -5,91 +5,91 @@ ms.date: "04/26/2017" ms.assetid: c2cf97f0-9262-4f1f-a754-5568b51110ad --- -# \ Element +# `` Element + +Determines whether the common language runtime uses the legacy 64-bit JIT compiler for just-in-time compilation. -Determines whether the common language runtime uses the legacy 64-bit JIT compiler for just-in-time compilation. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - +    **\** + +## Syntax + ```xml ``` The element name `useLegacyJit` is case-sensitive. - + ## Attributes and elements -The following sections describe attributes, child elements, and parent elements. - -### Attributes - -| Attribute | Description | -| --------- | --------------------------------------------------------------------------------------------- | -| `enabled` | Required attribute.

Specifies whether the runtime uses the legacy 64-bit JIT compiler. | - -### enabled attribute - -| Value | Description | -| ----- | ------------------------------------------------------------------------------------------------------------------- | -| 0 | The common language runtime uses the new 64-bit JIT compiler included in the .NET Framework 4.6 and later versions. | -| 1 | The common language runtime uses the older 64-bit JIT compiler. | - +The following sections describe attributes, child elements, and parent elements. + +### Attributes + +| Attribute | Description | +| --------- | --------------------------------------------------------------------------------------------- | +| `enabled` | Required attribute.

Specifies whether the runtime uses the legacy 64-bit JIT compiler. | + +### enabled attribute + +| Value | Description | +| ----- | ------------------------------------------------------------------------------------------------------------------- | +| 0 | The common language runtime uses the new 64-bit JIT compiler included in the .NET Framework 4.6 and later versions. | +| 1 | The common language runtime uses the older 64-bit JIT compiler. | + ### Child elements None - -### Parent elements - -| Element | Description | -| --------------- | ----------------------------------------------------------------------------------------------------------------- | -| `configuration` | The root element in every configuration file used by the common language runtime and .NET Framework applications. | -| `runtime` | Contains information about runtime initialization options. | - -## Remarks - -Starting with .NET Framework 4.6, the common language runtime uses a new 64-bit compiler for Just-In-Time (JIT) compilation by default. In some cases, this may result in a difference in behavior from application code that was JIT-compiled by the previous version of the 64-bit JIT compiler. By setting the `enabled` attribute of the `` element to `1`, you can disable the new 64-bit JIT compiler and instead compile your app using the legacy 64-bit JIT compiler. - + +### Parent elements + +| Element | Description | +| --------------- | ----------------------------------------------------------------------------------------------------------------- | +| `configuration` | The root element in every configuration file used by the common language runtime and .NET Framework applications. | +| `runtime` | Contains information about runtime initialization options. | + +## Remarks + +Starting with .NET Framework 4.6, the common language runtime uses a new 64-bit compiler for Just-In-Time (JIT) compilation by default. In some cases, this may result in a difference in behavior from application code that was JIT-compiled by the previous version of the 64-bit JIT compiler. By setting the `enabled` attribute of the `` element to `1`, you can disable the new 64-bit JIT compiler and instead compile your app using the legacy 64-bit JIT compiler. + > [!NOTE] -> The `` element affects 64-bit JIT compilation only. Compilation with the 32-bit JIT compiler is unaffected. - -Instead of using a configuration file setting, you can enable the legacy 64-bit JIT compiler in two other ways: - +> The `` element affects 64-bit JIT compilation only. Compilation with the 32-bit JIT compiler is unaffected. + +Instead of using a configuration file setting, you can enable the legacy 64-bit JIT compiler in two other ways: + - Setting an environment variable Set the `COMPLUS_useLegacyJit` environment variable to either `0` (use the new 64-bit JIT compiler) or `1` (use the older 64-bit JIT compiler): - - ```env - COMPLUS_useLegacyJit=0|1 - ``` - + + ```env + COMPLUS_useLegacyJit=0|1 + ``` + The environment variable has *global scope*, which means that it affects all applications run on the machine. If set, it can be overridden by the application configuration file setting. The environment variable name is not case-sensitive. - + - Adding a registry key You can enable the legacy 64-bit JIT compiler by adding a `REG_DWORD` value to either the `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework` or `HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework` key in the registry. The value is named `useLegacyJit`. If the value is 0, the new compiler is used. If the value is 1, the legacy 64-bit JIT compiler is enabled. The registry value name is not case-sensitive. - - Adding the value to the `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework` key affects all apps running on the machine. Adding the value to the `HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework` key affects all apps run by the current user. If a machine is configured with multiple user accounts, only apps run by the current user are affected, unless the value is added to the registry keys for other users as well. Adding the `` element to a configuration file overrides the registry settings, if they're present. - -## Example - -The following configuration file disables compilation with the new 64-bit JIT compiler and instead uses the legacy 64-bit JIT compiler. - -```xml - - - - - - -``` - + + Adding the value to the `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework` key affects all apps running on the machine. Adding the value to the `HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework` key affects all apps run by the current user. If a machine is configured with multiple user accounts, only apps run by the current user are affected, unless the value is added to the registry keys for other users as well. Adding the `` element to a configuration file overrides the registry settings, if they're present. + +## Example + +The following configuration file disables compilation with the new 64-bit JIT compiler and instead uses the legacy 64-bit JIT compiler. + +```xml + + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md) -- [\ Element](runtime-element.md) -- [\ Element](../configuration-element.md) +- [`` Element](runtime-element.md) +- [`` Element](../configuration-element.md) - [Mitigation: New 64-bit JIT Compiler](../../../migration-guide/mitigation-new-64-bit-jit-compiler.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md b/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md index c7efa7834bfd6..16d107678d80f 100644 --- a/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md @@ -2,97 +2,97 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -dev_langs: +dev_langs: - "csharp" - "vb" -helpviewer_keywords: +helpviewer_keywords: - "UseRandomizedStringHashAlgorithm element" - " element" ms.assetid: c08125d6-56cc-4b23-b482-813ff85dc630 --- -# \ Element +# `` Element + +Determines whether the common language runtime calculates hash codes for strings on a per application domain basis. -Determines whether the common language runtime calculates hash codes for strings on a per application domain basis. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml +    **\** + +## Syntax + +```xml -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.

Specifies whether hash codes for strings are calculated on a per application domain basis.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|`0`|The common language runtime does not compute hash codes for strings on a per application domain basis; a single algorithm is used to calculate string hash codes. This is the default.| -|`1`|The common language runtime computes hash codes for strings on a per application domain basis. Identical strings in different application domains and in different processes will have different hash codes.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about runtime initialization options.| - -## Remarks - - By default, the class and the method use a single hashing algorithm that produces a consistent hash code across application domains. This is equivalent to setting the `enabled` attribute of the `` element to `0`. This is the hashing algorithm used in the .NET Framework 4. - - The class and the method can also use a different hashing algorithm that computes hash codes on a per application domain basis. As a result, hash codes for equivalent strings will differ across application domains. This is an opt-in feature; to take advantage of it, you must set the `enabled` attribute of the `` element to `1`. - - The string lookup in a hash table is typically an O(1) operation. However, when a large number of collisions occur, the lookup can become an O(n2) operation. You can use the `` configuration element to generate a random hashing algorithm per application domain, which in turn limits the number of potential collisions, particularly when the keys from which the hash codes are calculated are based on data input by users. - -## Example - - The following example defines a `DisplayString` class that includes a private string constant, `s`, whose value is "This is a string." It also includes a `ShowStringHashCode` method that displays the string value and its hash code along with the name of the application domain in which the method is executing. - + enabled=0|1 /> +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies whether hash codes for strings are calculated on a per application domain basis.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|`0`|The common language runtime does not compute hash codes for strings on a per application domain basis; a single algorithm is used to calculate string hash codes. This is the default.| +|`1`|The common language runtime computes hash codes for strings on a per application domain basis. Identical strings in different application domains and in different processes will have different hash codes.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about runtime initialization options.| + +## Remarks + + By default, the class and the method use a single hashing algorithm that produces a consistent hash code across application domains. This is equivalent to setting the `enabled` attribute of the `` element to `0`. This is the hashing algorithm used in the .NET Framework 4. + + The class and the method can also use a different hashing algorithm that computes hash codes on a per application domain basis. As a result, hash codes for equivalent strings will differ across application domains. This is an opt-in feature; to take advantage of it, you must set the `enabled` attribute of the `` element to `1`. + + The string lookup in a hash table is typically an O(1) operation. However, when a large number of collisions occur, the lookup can become an O(n2) operation. You can use the `` configuration element to generate a random hashing algorithm per application domain, which in turn limits the number of potential collisions, particularly when the keys from which the hash codes are calculated are based on data input by users. + +## Example + + The following example defines a `DisplayString` class that includes a private string constant, `s`, whose value is "This is a string." It also includes a `ShowStringHashCode` method that displays the string value and its hash code along with the name of the application domain in which the method is executing. + [!code-csharp[System.String.GetHashCode#2](../../../../../samples/snippets/csharp/VS_Snippets_CLR_System/system.String.GetHashCode/CS/perdomain.cs#2)] - [!code-vb[System.String.GetHashCode#2](../../../../../samples/snippets/visualbasic/VS_Snippets_CLR_System/system.String.GetHashCode/VB/perdomain.vb#2)] - - When you run the example without supplying a configuration file, it displays output similar to the following. Note that the hash codes for the string are identical in the two application domains. - + [!code-vb[System.String.GetHashCode#2](../../../../../samples/snippets/visualbasic/VS_Snippets_CLR_System/system.String.GetHashCode/VB/perdomain.vb#2)] + + When you run the example without supplying a configuration file, it displays output similar to the following. Note that the hash codes for the string are identical in the two application domains. + ```console -String 'This is a string.' in domain 'PerDomain.exe': 941BCEAC -String 'This is a string.' in domain 'NewDomain': 941BCEAC -``` - - However, if you add the following configuration file to the example's directory and then run the example, the hash codes for the same string will differ by application domain. - -```xml - - - - - - -``` - - When the configuration file is present, the example displays the following output: - +String 'This is a string.' in domain 'PerDomain.exe': 941BCEAC +String 'This is a string.' in domain 'NewDomain': 941BCEAC +``` + + However, if you add the following configuration file to the example's directory and then run the example, the hash codes for the same string will differ by application domain. + +```xml + + + + + + +``` + + When the configuration file is present, the example displays the following output: + ```console -String 'This is a string.' in domain 'PerDomain.exe': 5435776D -String 'This is a string.' in domain 'NewDomain': 75CC8236 -``` - +String 'This is a string.' in domain 'PerDomain.exe': 5435776D +String 'This is a string.' in domain 'NewDomain': 75CC8236 +``` + ## See also - [Configure apps by using configuration files](../../index.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/usesmallinternalthreadstacks-element.md b/docs/framework/configure-apps/file-schema/runtime/usesmallinternalthreadstacks-element.md index 9af91b719d9d5..8d830bcb6e18d 100644 --- a/docs/framework/configure-apps/file-schema/runtime/usesmallinternalthreadstacks-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/usesmallinternalthreadstacks-element.md @@ -2,74 +2,74 @@ description: "Learn more about: Element" title: " Element" ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "UseSmallInternalThreadStacks element" - " element" ms.assetid: 1e3f6ec0-1cac-4e1c-9c81-17d948ae5874 --- -# \ Element +# `` Element + +Requests that the common language runtime (CLR) reduce memory use by specifying explicit stack sizes when it creates certain threads that it uses internally, instead of using the default stack size for those threads. -Requests that the common language runtime (CLR) reduce memory use by specifying explicit stack sizes when it creates certain threads that it uses internally, instead of using the default stack size for those threads. - [**\**](../configuration-element.md)\   [**\**](runtime-element.md)\ -    **\** - -## Syntax - -```xml - -``` - -## Attributes and Elements - - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|enabled|Required attribute.

Specifies whether to request that the CLR use explicit stack sizes instead of the default stack size when it creates certain threads that it uses internally. The explicit stack sizes are smaller than the default stack size of 1 MB.| - -## enabled Attribute - -|Value|Description| -|-----------|-----------------| -|true|Request explicit stack sizes.| -|false|Use the default stack size. This is the default for the .NET Framework 4.| - -### Child Elements - - None. - -### Parent Elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about assembly binding and garbage collection.| - -## Remarks - - This configuration element is used to request reduced virtual memory use in a process, because the explicit thread sizes that the CLR uses for its internal threads, if the request is honored, are smaller than the default size. - +    **\** + +## Syntax + +```xml + +``` + +## Attributes and Elements + + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|enabled|Required attribute.

Specifies whether to request that the CLR use explicit stack sizes instead of the default stack size when it creates certain threads that it uses internally. The explicit stack sizes are smaller than the default stack size of 1 MB.| + +## enabled Attribute + +|Value|Description| +|-----------|-----------------| +|true|Request explicit stack sizes.| +|false|Use the default stack size. This is the default for the .NET Framework 4.| + +### Child Elements + + None. + +### Parent Elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + + This configuration element is used to request reduced virtual memory use in a process, because the explicit thread sizes that the CLR uses for its internal threads, if the request is honored, are smaller than the default size. + > [!IMPORTANT] -> This configuration element is a request to the CLR rather than an absolute requirement. In the .NET Framework 4, the request is honored only for the x86 architecture. This element might be ignored completely in future versions of the CLR, or replaced by explicit stack sizes that are always used for selected internal threads. - - Specifying this configuration element trades reliability for smaller virtual memory use if the CLR honors the request, because smaller stack sizes could potentially make stack overflows more likely. - -## Example - - The following example shows how to request that the CLR use explicit stack sizes for certain threads that it uses internally. - -```xml - - - - - -``` - +> This configuration element is a request to the CLR rather than an absolute requirement. In the .NET Framework 4, the request is honored only for the x86 architecture. This element might be ignored completely in future versions of the CLR, or replaced by explicit stack sizes that are always used for selected internal threads. + + Specifying this configuration element trades reliability for smaller virtual memory use if the CLR honors the request, because smaller stack sizes could potentially make stack overflows more likely. + +## Example + + The following example shows how to request that the CLR use explicit stack sizes for certain threads that it uses internally. + +```xml + + + + + +``` + ## See also - [Configure apps by using configuration files](../../index.md)