<assemblyIdentity>項目 (ClickOnce 部署)<assemblyIdentity> element (ClickOnce deployment)

識別主要組件的ClickOnceClickOnce應用程式。Identifies the primary assembly of the ClickOnceClickOnce application.

語法Syntax


      <assemblyIdentity  
   name 
   version
   publicKeyToken
   processorArchitecture
    type
/>

元素和屬性Elements and attributes

assemblyIdentity是必要元素。The assemblyIdentity element is required. 它包含沒有子項目,並具有下列屬性。It contains no child elements and has the following attributes.

屬性Attribute 描述Description
name 必要項。Required. 識別部署的人類看得懂的名稱僅供參考之用。Identifies the human-readable name of the deployment for informational purposes.

如果name包含特殊字元,例如單引號或雙引號括住,應用程式可能無法啟動。If name contains special characters, such as single or double quotes, the application may fail to activate.
version 必要項。Required. 指定的組件的版本號碼,格式如下: major.minor.build.revisionSpecifies the version number of the assembly, in the following format: major.minor.build.revision.

此值必須遞增來觸發應用程式更新的更新資訊清單中。This value must be incremented in an updated manifest to trigger an application update.
publicKeyToken 必要項。Required. 指定 16 個字元的十六進位字串,表示用以簽署部署資訊清單的公開金鑰的 sha-1 雜湊值的最後 8 個位元組。Specifies a 16-character hexadecimal string that represents the last 8 bytes of the SHA-1 hash value of the public key under which the deployment manifest is signed. 公開金鑰用來登入必須是 2048 位元或更高。The public key that is used to sign must be 2048 bits or greater.

雖然是簽署組件的建議但非必要,這個屬性是必要的。Although signing an assembly is recommended but optional, this attribute is required. 如果組件是不帶正負號,您應該從自我簽署的組件複製值,或使用 「 虛擬 」 全部為零的值。If an assembly is unsigned, you should copy a value from a self-signed assembly or use a "dummy" value of all zeros.
processorArchitecture 必要項。Required. 指定的處理器。Specifies the processor. 有效的值為msil對所有處理器來說x86的 32 位元 WindowsIA64的 64 位元 Windows 和Itanium適用於 Intel 64 位元 Itanium 處理器。The valid values are msil for all processors, x86 for 32-bit Windows, IA64 for 64-bit Windows, and Itanium for Intel 64-bit Itanium processors.
type 必要項。Required. 使用 Windows 來並行安裝技術的相容性。For compatibility with Windows side-by-side installation technology. 唯一允許的值是win32The only allowed value is win32.

備註Remarks

範例Example

下列程式碼範例說明assemblyIdentity中的項目ClickOnceClickOnce部署資訊清單。The following code example illustrates an assemblyIdentity element in a ClickOnceClickOnce deployment manifest. 此程式碼範例是針對提供之較大範例的一部分ClickOnce 部署資訊清單主題。This code example is part of a larger example provided for the ClickOnce deployment manifest topic.

<!-- Identify the deployment. -->
<assemblyIdentity
  name="My Application Deployment.app"
  version="1.0.0.0"
  publicKeyToken="43cb1e8e7a352766"
  language="neutral"
  processorArchitecture="x86"
  xmlns="urn:schemas-microsoft-com:asm.v1" />

另請參閱See also