<entryPoints> 項目 (Visual Studio 中的 Office 程式開發)

vstav3 命名空間的 entryPoints 項目包含與 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 程式開發)中定義。

文件層級自訂範例

描述

下列程式碼範例會示範,以 ClickOnce 部署之文件層級方案的應用程式資訊清單中的 entryPoints 項目。 這個程式碼範例是 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>

應用程式層級增益集範例

說明

下列程式碼範例示範使用 ClickOnce 所部署之應用程式層級方案應用程式資訊清單中的 entryPoints 項目。 這個程式碼範例是 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>

請參閱

參考

Office 方案的應用程式資訊清單

Office 方案的部署資訊清單

ClickOnce 應用程式資訊清單