<entryPoints> 元素 (Visual Studio 中的 Office 開發)
entryPoints
命名空間的 vstav3
項目包含與 Office 方案相關聯的所有 entryPoint
項目。
語法
<entryPoints>
<entryPoint>
</entryPoint>
<entryPoint>
</entryPoint>
<entryPoint>
</entryPoint>
</entryPoints>
元素和屬性
entryPoints
項目是必要項,且位於 vstav3
命名空間。 在應用程式資訊清單中,會為每個 Office 方案定義一個 entryPoints
項目。 例如,如果您在多專案的部署中部署三個 Office 方案,則在應用程式資訊清單中會有三個 entryPoints
項目。
entryPoints
項目具有下列屬性。
屬性 | 描述 |
---|---|
id | 多專案部署所需。 Office 方案的名稱。 id 不能包含等號 (=)。 |
entryPoints
具有下列項目。
entryPoint
必要。 命名空間中vstav3
元素的角色entryPoint
定義於< entryPoint> 元素中(Visual Studio 中的 Office 開發)。
檔層級自定義範例
描述
下列程式代碼範例說明 entryPoints
使用 ClickOnce 所部署檔層級解決方案之應用程式指令清單中的專案。 此程式代碼範例是 Office 解決方案應用程式指令清單中提供之較大範例的一部分。
代碼
<vstav3:entryPoints>
<vstav3:entryPoint
class="ContosoExcelWorkbook.ThisWorkbook">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
<vstav3:entryPoint
class="ContosoExcelWorkbook.Sheet1">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
<vstav3:entryPoint
class="ContosoExcelWorkbook.Sheet2">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
<vstav3:entryPoint
class="ContosoExcelWorkbook.Sheet3">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
</vstav3:entryPoints>
VSTO 載入宏範例
描述
下列程式代碼範例說明 entryPoints
使用 ClickOnce 部署之應用層級解決方案的應用程式指令清單中的專案。 此程式代碼範例是 Office 解決方案應用程式指令清單中提供之較大範例的一部分。
代碼
<vstav3:entryPoints>
<vstav3:entryPoint
class="ContosoOutlookAddIn.ThisAddIn">
<assemblyIdentity
name="ContosoOutlookAddIn"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
</vstav3:entryPoints>
多專案部署範例
描述
下列程式碼範例說明多專案部署的應用程式資訊清單中的 entryPoints
項目。 此程式代碼範例是 Office 解決方案應用程式指令清單中提供之較大範例的一部分。
程式碼
<vstav3:entryPoints
id="ContosoExcel">
<vstav3:entryPoint
class="ContosoExcelWorkbook.ThisWorkbook">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
<vstav3:entryPoint
class="ContosoExcelWorkbook.Sheet1">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
<vstav3:entryPoint
class="ContosoExcelWorkbook.Sheet2">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
<vstav3:entryPoint
class="ContosoExcelWorkbook.Sheet3">
<assemblyIdentity
name="ContosoExcelWorkbook"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
</vstav3:entryPoints>
<vstav3:entryPoints
id="ContosoOutlook">
<vstav3:entryPoint
class="ContosoOutlookAddIn.ThisAddIn">
<assemblyIdentity
name="ContosoOutlookAddIn"
version="1.0.0.0"
language="neutral"
processorArchitecture="msil" />
</vstav3:entryPoint>
</vstav3:entryPoints>