<postAction> 元素 (Visual Studio 中的 Office 開發)

postAction 命名空間的 vstav3 項目包含 entrypoint 項目和所有 postActionData 項目,這些項目與安裝 Office 方案後執行的部署後動作相關。

語法

<postAction>
  <entryPoint>
  </entryPoint>
  <postActionData>
  </postActionData>
</postAction>

元素和屬性

postAction 項目是選擇項,且位於 vstav3 命名空間。 在應用程式資訊清單中,會為每個部署後動作定義一個 postAction 項目。

postAction 項目沒有任何屬性。

postAction 具有下列項目。

entryPoint

選擇性。 命名空間中vstav3元素的角色entryPoint定義於 <entryPoints> 元素中(Visual Studio 中的 Office 開發)。

postActionData

選擇性。 命名空間中vstav3元素的角色postActionData定義於 <postActionData> 元素中(Visual Studio 中的 Office 開發)。

部署後動作範例

描述

下列程式代碼範例說明 postAction 使用 ClickOnce 所部署 Office 解決方案之應用程式指令清單中的 專案。 此程式代碼範例是 Office 解決方案應用程式指令清單中提供之較大範例的一部分。

程式碼

<vstav3:postAction>
  <vstav3:entryPoint
    class="PostDeploymentAction.PostDeploymentActionSample">
    <assemblyIdentity
      name="PostDeploymentAction"
      version="1.0.0.0"
      language="neutral"
      processorArchitecture="msil" />
  </vstav3:entryPoint>
  <vstav3:postActionData>
  </vstav3:postActionData>
</vstav3:postAction>

另請參閱