<shadowCopyVerifyByTimestamp> 項目<shadowCopyVerifyByTimestamp> Element

指定陰影複製是否使用 .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.

<configuration> <configuration>
    <runtime >   <runtime>
     <shadowcopyverifybytimestamp> >    <shadowCopyVerifyByTimestamp>

語法Syntax

<shadowCopyVerifyByTimestamp enabled="true|false" />  

屬性和項目Attributes and Elements

下列各節描述屬性、子項目和父項目。The following sections describe attributes, child elements, and parent elements.

屬性Attributes

屬性Attribute 描述Description
enabledenabled 必要屬性。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
truetrue 在啟動時,只會複製自上次複製到陰影複製目錄後已更新的元件。At startup, copies only assemblies that have been updated since they were last copied to the shadow copy directory. 這是 .NET Framework 4 的預設值。This is the default for the .NET Framework 4.
Falsefalse 還原為舊版 .NET Framework 的啟動行為,也就是在啟動時複製所有檔案。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 通用語言執行平台和 .NET Framework 應用程式所使用之每個組態檔中的根項目。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

從 .NET Framework 4 開始,只有在其時間戳記指出自最後一次複製到陰影複製目錄之後,才會將元件陰影複製。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. 組件更新比例與頻率相當高的應用程式可能不會受益於這種行為變更。Applications that have a high percentage and frequency of assembly updates might not benefit from this change in behavior. 在這種情況下,您可以使用此項目還原舊版 .NET Framework 的行為。In that case, you can use this element to restore the behavior of previous versions of the .NET Framework.

範例Example

下列範例顯示如何在 .NET Framework 4 中停用陰影複製的預設啟動行為,並還原為舊版 .NET Framework 的啟動行為。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.

<configuration>  
   <runtime>  
      <shadowCopyVerifyByTimestamp enabled="false" />  
   </runtime>  
</configuration>  

請參閱See also