<執行時間 > 元素<runtime> Element

提供 common language runtime 用來設定應用程式的資訊。Provides information used by the common language runtime to configure applications.

<configuration><configuration>
  <執行時間 >  <runtime>

語法Syntax

<runtime>
</runtime>

屬性和元素Attributes and Elements

下列各節描述子項目和父元素。The following sections describe child elements and parent elements.

屬性Attributes

None。None.

子元素Child Elements

項目Element 描述Description
<alwaysFlowImpersonationPolicy><alwaysFlowImpersonationPolicy> 指定 Windows 識別一律流經非同步點,而不論模擬的執行方式為何。Specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed.
<AppContextSwitchOverrides><AppContextSwitchOverrides> 定義一或多個由 AppContext 類別所使用的參數,以提供新功能的退出機制。Defines one or more switches used by the AppContext class to provide an opt-out mechanism for new functionality.
<appDomainManagerAssembly><appDomainManagerAssembly> 針對處理序中的預設應用程式網域,指定提供應用程式網域管理員的組件。Specifies the assembly that provides the application domain manager for the default application domain in the process.
<appDomainManagerType><appDomainManagerType> 針對預設應用程式網域,指定做為應用程式網域管理員的類型。Specifies the type that serves as the application domain manager for the default application domain.
<appDomainResourceMonitoring><appDomainResourceMonitoring> 針對處理序存留期間,指示執行階段收集處理序中所有應用程式網域的統計資料。Instructs the runtime to collect statistics on all application domains in the process for the life of the process.
<assemblyBinding><assemblyBinding> 包含有關組件版本重新導向和組件位置的資訊。Contains information about assembly version redirection and the locations of assemblies.
<bypassTrustedAppStrongNames><bypassTrustedAppStrongNames> 指定是否應略過信任組件的強式名稱驗證。Specifies whether strong name verification for trusted assemblies should be bypassed.
<CompatSortNLSVersion><CompatSortNLSVersion> 指定執行時間在執行字串比較時,應使用舊版排序行為。Specifies that the runtime should use legacy sorting behavior when performing string comparisons.
<developmentMode><developmentMode> 指定執行階段是否要在 DEVPATH 環境變數所指定的目錄中搜尋組件。Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable.
<disableCachingBindingFailures><disableCachingBindingFailures> 指定是否停用系結失敗的快取(這是 .NET Framework 版本2.0 中的預設行為)。Specifies whether the caching of binding failures, which is the default behavior in the .NET Framework version 2.0, is disabled.
<disableCommitThreadStack><disableCommitThreadStack> 指定是否在執行緒啟動時認可完整執行緒堆疊。Specifies whether the full thread stack is committed when a thread is started.
<disableFusionUpdatesFromADManager><disableFusionUpdatesFromADManager> 指定是否停用預設行為 (亦即允許執行階段主機覆寫應用程式網域的組態設定)。Specifies whether the default behavior, which is to allow the runtime host to override configuration settings for an application domain, is disabled.
<EnableAmPmParseAdjustment><EnableAmPmParseAdjustment> 針對只包含日期、月份、小時和上午/下午指示項的日期字串,決定日期及時間剖析方法是否使用一組調整過的規則來剖析。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><enforceFIPSPolicy> 指定是否強制執行電腦設定需求,以便讓密碼編譯演算法符合美國聯邦資訊處理標準 (FIPS) 的規範。Specifies whether to enforce a computer configuration requirement that cryptographic algorithms must comply with the Federal Information Processing Standards (FIPS).
<etwEnable><etwEnable> 指定是否為通用語言執行平台事件啟用 Windows 事件追蹤 (ETW)。Specifies whether to enable event tracing for Windows (ETW) for common language runtime events.
<forcePerformanceCounterUniqueSharedMemoryReads><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><gcAllowVeryLargeObjects> 在 64 位元平台上,啟用總大小大於 2 GB 的陣列。On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size.
<gcConcurrent><gcConcurrent> 指定 common language runtime 是否同時執行垃圾收集。Specifies whether the common language runtime runs garbage collection concurrently.
<GCCpuGroup><GCCpuGroup> 指定記憶體回收是否支援多個 CPU 群組。Specifies whether garbage collection supports multiple CPU groups.
<GCHeapAffinitizeMask ><GCHeapAffinitizeMask> 定義垃圾收集堆積與個別處理器之間的親和性。Defines the affinity between garbage collection heaps and individual processors.
<GCHeapCount ><GCHeapCount> 指定要用於伺服器垃圾收集的堆積/執行緒數目。Specifies the number of heaps/threads to use for server garbage collection.
<GCLOHThreshold ><GCLOHThreshold> 指定導致垃圾收集行程將物件放在大型物件堆積上的臨界值大小。Specifies the threshold size that causes the garbage collector to put objects on the large object heap.
<GCNoAffinitize ><GCNoAffinitize> 指定是否要將相似化為具有 Cpu 的伺服器垃圾收集執行緒。Specifies whether or not to affinitize server garbage collection threads with CPUs.
<gcServer><gcServer> 指定 Common Language Runtime 是否執行伺服器記憶體回收。Specifies whether the common language runtime runs server garbage collection.
<generatePublisherEvidence><generatePublisherEvidence> 指定執行階段是否使用程式碼存取安全性 (CAS) 發行者原則。Specifies whether the runtime uses code access security (CAS) publisher policy.
<legacyCorruptedStateExceptionsPolicy><legacyCorruptedStateExceptionsPolicy> 指定執行階段是否允許 Managed 程式碼攔截存取違規和其他損毀狀態例外狀況。Specifies whether the runtime allows managed code to catch access violations and other corrupted state exceptions.
<legacyImpersonationPolicy><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><loadfromRemoteSources> 指定是否以完全信任的方式載入來自遠端來源的組件。Specifies whether assemblies from remote sources are loaded as full trust.
<NetFx40_LegacySecurityPolicy ><NetFx40_LegacySecurityPolicy> 指定執行階段是否使用舊版程式碼存取安全性 (CAS) 原則。Specifies whether the runtime uses legacy code access security (CAS) policy.
<NetFx40_PInvokeStackResilience ><NetFx40_PInvokeStackResilience> 指定執行階段是否會在執行階段自動修復不正確的平台叫用宣告,即使這麼做會使 Managed 和 Unmanaged 程式碼之間的轉換變慢。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 ><NetFx45_CultureAwareComparerGetHashCode_LongStrings> 指定執行階段是否使用固定的記憶體數量計算 StringComparer.GetHashCode 方法的雜湊碼。Specifies whether the runtime uses a fixed amount of memory to calculate hash codes for the StringComparer.GetHashCode method.
<PreferComInsteadOfRemoting ><PreferComInsteadOfRemoting> 指定執行階段會使用 COM Interop,而不是跨越應用程式網域界限的遠端處理。Specifies that the runtime will use COM interop instead of remoting across application domain boundaries.
<relativeBindForResources><relativeBindForResources> 最佳化附屬組件的探查。Optimizes the probe for satellite assemblies.
<shadowCopyVerifyByTimeStamp><shadowCopyVerifyByTimeStamp> 指定陰影複製是否使用 .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><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><system.runtime.caching> 提供預設記憶體內部物件快取的組態資訊。Provides configuration information for the default in-memory object cache.
<Thread_UseAllCpuGroups ><Thread_UseAllCpuGroups> 指定執行階段是否會將 Managed 執行緒分散到所有 CPU 群組。Specifies whether the runtime distributes managed threads across all CPU groups.
<ThrowUnobservedTaskExceptions><ThrowUnobservedTaskExceptions> 指定未處理的工作例外狀況是否應終止執行中的處理序。Specifies whether unhandled task exceptions should terminate a running process.
<TimeSpan_LegacyFormatMode ><TimeSpan_LegacyFormatMode> 指定執行階段是否針對 TimeSpan 值使用舊版格式。Specifies whether the runtime uses legacy formatting for TimeSpan values.
<useLegacyJit><useLegacyJit> 決定通用語言執行平台是否針對 Just-In-Time 編譯使用舊版 64 位元 JIT 編譯器。Determines whether the common language runtime uses the legacy 64-bit JIT compiler for just-in-time compilation.
<UseRandomizedStringHashAlgorithm><UseRandomizedStringHashAlgorithm> 指定執行階段是否依照應用程式網域來計算字串的雜湊碼。Specifies whether the runtime calculates hash codes for strings on a per application domain basis.
<UseSmallInternalThreadStacks><UseSmallInternalThreadStacks> 要求執行階段在建立內部使用的特定執行緒時,使用明確的堆疊大小,而不是預設的堆疊大小。Requests that the runtime use explicit stack sizes when it creates certain threads that it uses internally, instead of the default stack size.

父項目Parent Elements

項目Element 描述Description
configuration 通用語言執行平台和 .NET Framework 應用程式所使用之每個組態檔中的根項目。The root element in every configuration file used by the common language runtime and .NET Framework applications.

備註Remarks

通用語言執行平臺會使用設定檔的<執行時間 >區段中的子項目,來設定應用程式的執行方式。The child elements in the <runtime> section of a configuration file are used by the common language runtime to configure how an application executes. 例如, <gcServer >專案會判斷垃圾收集行程是否使用工作站垃圾收集或伺服器垃圾收集, <UseRandomizedStringHashAlgorithm >專案會判斷 common language runtime 是否會針對每個應用程式或每個應用程式網域來計算字串的雜湊碼,而 AppContextSwitchOverrides 元素可讓程式庫使用者加入宣告或退出程式庫所提供的變更功能。For example, the <gcServer> element determines whether the garbage collector uses workstation garbage collection or server garbage collection, the <UseRandomizedStringHashAlgorithm> element determines whether the common language runtime calculates hash codes for string on a per-application or a per-application domain basis, and the AppContextSwitchOverrides element allows library users to opt in or opt out of changed functionality provided by a library.

在應用程式啟動時,common language runtime 會自動讀取<執行時間 >區段中的元素。The elements in the <runtime> section are read automatically by the common language runtime at application startup. 您也可以定義非預設應用程式域的設定檔,方法是將其名稱提供給 AppDomainSetup.ConfigurationFile 屬性;載入應用程式域時,會自動讀取其設定。You can also define the configuration file for a non-default application domain by supplying its name to the AppDomainSetup.ConfigurationFile property; its settings are read automatically when the application domain is loaded. 如果您需要在應用程式的設定檔中,直接讀取<執行時間 >區段中的設定,您應該很少。You should rarely, if ever, have a need to directly read the settings in the <runtime> section in your application's configuration file.

另請參閱See also