运行时设置架构Run-time settings schema

运行时设置由公共语言运行时用于配置面向 .NET Framework 的应用程序。Run-time settings are used by the common language runtime to configure applications that target the .NET Framework.

<runtime>节及其父元素和子元素The <runtime> section and its parent and child elements


按字母顺序排列的 <runtime> 元素列表Alphabetical list of <runtime> elements

元素Element 说明Description
<add> 向内存缓存的 namedCaches 集合添加一个命名的缓存。Adds a named cache to the namedCaches collection for a memory cache.
<alwaysFlowImpersonationPolicy> 指定 Windows 标识始终流经异步点,而不考虑执行模拟的方式。Specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed.
<AppContextSwitchOverrides> 定义 AppContext 类使用的一个或多个开关,用于提供新功能的选择退出机制。Defines one or more switches used by the AppContext class to provide an opt-out mechanism for new functionality.
<appDomainManagerAssembly> 指定为过程中的默认应用程序域提供应用程序域管理器的程序集。Specifies the assembly that provides the application domain manager for the default application domain in the process.
<appDomainManagerType> 指定用作默认应用程序域的应用程序域管理器的类型。Specifies the type that serves as the application domain manager for the default application domain.
<appDomainResourceMonitoring> 指示运行时在过程的生命周期过程中收集所有应用程序域的统计数据。Instructs the runtime to collect statistics on all application domains in the process for the life of the process.
<assemblyBinding> 包含有关程序集版本重定向和程序集位置的信息。Contains information about assembly version redirection and the locations of assemblies.
<assemblyIdentity> 包含有关程序集的标识信息。Contains identifying information about an assembly.
<bindingRedirect> 将一个程序集版本重定向到另一个版本。Redirects one assembly version to another.
<bypassTrustedAppStrongNames> 指定是否应绕过对受信任的程序集进行强名称验证。Specifies whether strong name verification for trusted assemblies should be bypassed.
<clear> 清除内存缓存的 namedCaches 集合。Clears the namedCaches collection for a memory cache.
<codeBase> 指定运行时可以找到程序集的位置。Specifies where the runtime can find an assembly.
<CompatSortNLSVersion> 指定在执行字符串比较时,运行时应使用旧排序行为Specifies that the runtime should use legacy sorting behavior when performing string comparisons
<dependentAssembly> 封装每个程序集的绑定策略和程序集位置。Encapsulates binding policy and assembly location for each assembly.
<developmentMode> 指定运行时是否搜索由 DEVPATH 环境变量指定的目录中的程序集。Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable.
<disableCachingBindingFailures> 指定是否禁用绑定故障缓存,这是 .NET Framework 2.0 中的默认行为。Specifies whether the caching of binding failures, which is the default behavior in the .NET Framework 2.0, is disabled.
<disableCommitThreadStack> 指定在线程启动时是否提交完整线程堆栈。Specifies whether the full thread stack is committed when a thread starts.
<disableFusionUpdatesFromADManager> 指定是否禁用允许运行时主机为应用程序域重写配置设置的默认行为。Specifies whether the default behavior, which is to allow the runtime host to override configuration settings for an application domain, is disabled.
<EnableAmPmParseAdjustment> 确定日期和时间分析方法是否使用调整后的一组规则来分析仅包含天、月、小时和 AM/PM 指示符的日期字符串。Determines 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.
<enforceFIPSPolicy> 指定是否强制执行以下计算机配置要求:加密算法必须符合美国联邦信息处理标准 (FIPS)。Specifies whether to enforce a computer configuration requirement that cryptographic algorithms must comply with the Federal Information Processing Standards (FIPS).
<etwEnable> 指定是否为公共语言运行时事件启用 Windows 事件跟踪 (ETW)。Specifies whether to enable event tracing for Windows (ETW) for common language runtime events.
<forcePerformanceCounterUniqueSharedMemoryReads> 指定 PerfCounter.dll 是否使用 .NET Framework 版本 1.1 应用程序中的 CategoryOptions 注册表设置,以确定是否加载来自特定于类别的共享内存或全局内存的性能计数器数据。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.
<gcAllowVeryLargeObjects> 在 64 位平台上,启用总大小大于 2 千兆字节 (GB) 的数组。On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size.
<gcConcurrent> 指定运行时是否并发运行服务器垃圾回收。Specifies whether the runtime runs garbage collection concurrently.
<GCCpuGroup> 指定垃圾回收是否支持多个 CPU 组。Specifies whether garbage collection supports multiple CPU groups.
<GCHeapAffinitizeMask> 定义 GC 堆和单个处理器之间的关联。Defines the affinity between GC heaps and individual processors.
<GCHeapCount> 指定用于服务器垃圾回收的堆/线程数。Specifies the number of heaps/threads to use for server garbage collection.
<GCLOHThreshold> 指定导致对象在大型对象堆上 (LOH) 的阈值大小。Specifies the threshold size that causes objects to go on the large object heap (LOH).
<GCNoAffinitize> 指定是否关联服务器 GC 线程与 Cpu。Specifies whether or not to affinitize server GC threads with CPUs.
<gcServer> 指定公共语言运行时是否运行服务器垃圾回收。Specifies whether the common language runtime runs server garbage collection.
<generatePublisherEvidence> 指定运行时是否使用代码访问安全性 (CAS) 发布服务器策略。Specifies whether the runtime uses code access security (CAS) publisher policy.
<legacyCorruptedStateExceptionsPolicy> 指定运行时是否允许托管的代码捕获访问冲突和其他损坏状态异常。Specifies whether the runtime allows managed code to catch access violations and other corrupted state exceptions.
<legacyImpersonationPolicy> 指定 Windows 标识不流经异步点,而不考虑当前线程上执行上下文的流设置。Specifies that the Windows identity does not flow across asynchronous points, regardless of the flow settings for the execution context on the current thread.
<loadfromRemoteSources> 指定是否将来自远程源的程序集加载为完全信任。Specifies whether assemblies from remote sources are loaded as full trust.
<memoryCache> 定义一个用于配置基于 MemoryCache 类的缓存的元素。Defines an element that is used to configure a cache that is based on the MemoryCache class.
<namedCaches> 包含 namedCache 实例的配置设置的集合。Contains a collection of configuration settings for the namedCache instance.
<NetFx40_LegacySecurityPolicy> 指定运行时是否使用旧版代码访问安全性 (CAS) 策略。Specifies whether the runtime uses legacy code access security (CAS) policy.
<NetFx40_PInvokeStackResilience> 指定运行时是否以减慢托管和非托管代码之间的转换速度为代价,在运行时自动修复不正确的平台调用声明。Specifies whether the runtime automatically fixes incorrect platform invoke declarations at run time, at the cost of slower transitions between managed and unmanaged code.
<NetFx45_CultureAwareComparerGetHashCode_LongStrings> 指定运行时是否使用固定的内存量来计算 StringComparer.GetHashCode 方法的哈希代码。Specifies whether the runtime uses a fixed amount of memory to calculate hash codes for the StringComparer.GetHashCode method.
<PreferComInsteadOfManagedRemoting> 指定运行时将使用 COM 互操作来代替跨应用程序域边界的远程。Specifies that the runtime will use COM interop instead of remoting across application domain boundaries.
<probing> 指定加载程序集时运行时搜索的子目录。Specifies subdirectories that the runtime searches when loading assemblies.
<publisherPolicy> 指定运行时是否使用发布者策略。Specifies whether the runtime applies publisher policy.
<qualifyAssembly> 指定使用部分名称时应动态加载的程序集全名。Specifies the full name of the assembly that should be dynamically loaded when a partial name is used.
<relativeBindForResources> 优化附属程序集的探测。Optimizes the probe for satellite assemblies.
<remove> 从内存缓存的 namedCaches 集合中删除一个命名的缓存条目。Removes a named cache entry from the namedCaches collection for a memory cache.
<runtime> 包含有关程序集绑定和垃圾回收行为的信息。Contains information about assembly binding and the behavior of garbage collection.
<shadowCopyTimeStampVerification> 指定卷影复制是否使用 .NET Framework 4 中引入的默认启动行为,或恢复为 .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.
<supportPortability> 通过禁用将程序集视为等效于应用程序可移植性用途的默认行为来指定应用程序可以在两种不同的 .NET Framework 实现中引用同一程序集。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.
<system.runtime.caching> 提供默认内存中对象缓存的配置信息。Provides configuration information for the default in-memory object cache.
<Thread_UseAllCpuGroups> 指定运行时是否跨所有 CPU 组分发托管的线程。Specifies whether the runtime distributes managed threads across all CPU groups.
<ThrowUnobservedTaskExceptions> 指定未经处理的任务异常是否应终止正在运行的进程。Specifies whether unhandled task exceptions should terminate a running process.
<TimeSpan_LegacyFormatMode> 指定运行时是否使用 TimeSpan 值的旧格式。Specifies whether the runtime uses legacy formatting for TimeSpan values.
<useLegacyJit> 确定公共语言运行时是否使用实时编译的旧版 64 位 JIT 编译器。Determines whether the common language runtime uses the legacy 64-bit JIT compiler for just-in-time compilation.
<UseRandomizedStringHashAlgorithm> 指定运行时是否按应用程序域计算字符串的哈希代码。Specifies whether the runtime calculates hash codes for strings on a per application domain basis.
<UseSmallInternalThreadStacks> 请求运行时在创建内部使用的某些线程时使用显式堆栈大小,而不是默认堆栈大小。Requests that the runtime use explicit stack sizes when it creates certain threads that it uses internally, instead of the default stack size.

请参阅See also