發佈 ClickOnce 應用程式Publish ClickOnce applications

首次發行 ClickOnceClickOnce 應用程式時,可以使用 [發行精靈] 來設定發行屬性。When publishing a ClickOnceClickOnce application for the first time, publish properties can be set using the Publish Wizard. 這個精靈僅提供少數屬性;所有其他屬性都設為其預設值。Only a few of the properties are available in the wizard; all other properties are set to their default values.

對發佈屬性所進行的任何後續變更,可在 [專案設計工具] 的 [發佈] 頁面中進行。Subsequent changes to publish properties are made on the Publish page in the Project Designer.

發行精靈Publish Wizard

您可以使用 [發行精靈] 來設定基本設定,以發行您的應用程式。You can use the Publish Wizard to set the basic settings for publishing your application. 這包括以下的發行屬性:This includes the following publishing properties:

  • 發行資料夾位置:Visual Studio 複製檔案 (本機電腦、網路檔案共用、FTP 伺服器或網站) 的位置Publishing Folder Location - where Visual Studio will copy the files (local computer, network file share, FTP server, or Web site)

  • 安裝資料夾位置:終端使用者進行安裝的來源之處 (網路檔案共用、FTP 伺服器、網站、CD/DVD)Installation Folder Location - where end users will install from (network file share, FTP server, Web site, CD/DVD)

  • 線上或離線可用性:終端使用者是否可以在有網路連線或在沒有網路連線的情況下,存取應用程式Online or Offline availability - if end users can access the application with or without a network connection

  • 更新頻率:應用程式查看是否新的更新之頻率。Update frequency - how often the application checks for new updates.

    如需詳細資訊,請參閱如何:使用 [發佈精靈] 發佈 ClickOnce 應用程式For more information, see How to: Publish a ClickOnce application using the Publish Wizard.

發行頁面Publish Page

[專案設計工具] 的 [發行] 頁面,可用以設定 ClickOnce 部署的屬性。The Publish page of the Project Designer is used to configure properties for ClickOnce deployment. 下表列出相關主題。The following table lists topics.

標題Title 說明Description
如何:指定 Visual Studio 複製檔案的位置How to: Specify where Visual Studio copies the files 描述如何設定 Visual Studio 放置應用程式檔案和資訊清單的位置。Describes how to set where Visual Studio puts the application files and manifests.
如何:指定位置讓終端使用者從此處執行安裝作業How to: Specify the location where end users will install from 描述如何設定使用者下載及安裝應用程式的位置。Describes how to set the location where users go to download and install the application.
如何:指定 ClickOnce 離線或線上安裝模式How to: Specify the ClickOnce offline or online install mode 描述如何設定是否可離線或在線上使用應用程式。Describes how to set whether the application will be available offline or online.
如何:設定 ClickOnce 發佈版本How to: Set the ClickOnce publish version 描述如何設定 ClickOnce 發佈版本屬性,其會決定是否將您發佈的應用程式視為更新。Describes how to set the ClickOnce Publish Version property, which determines whether or not the application that you are publishing will be treated as an update.
如何:自動累加 ClickOnce 的發佈版本How to: Automatically increment the ClickOnce publish version 描述如何在每次發佈應用程式時,自動遞增 PublishVersion 的修訂編號。Describes how to automatically increment the Revision number of the PublishVersion each time you publish the application.

如需詳細資訊,請參閱專案設計工具、 發行頁For more information, see Publish Page, Project Designer

[應用程式檔案] 對話方塊Application Files dialog box

您可利用這個對話方塊,指定專案中的檔案會如何分類以進行發行、動態下載與更新。This dialog box allows you to specify how the files in your project are categorized for publishing, dynamic downloading, and updating. 它包含的方格會列出預設未排除或有下載群組的專案檔案。It contains a grid that lists the project files that are not excluded by default, or that have a download group.

若要排除檔案,將檔案標記為資料檔或必備檔案,並在 Visual Studio UI 中建立條件式安裝的檔案群組,請參閱如何:指定哪些檔案是由 ClickOnce 發佈To exclude files, mark files as data files or prerequisites, and create groups of files for conditional installation in the Visual Studio UI, see How to: Specify which files are published by ClickOnce. 您也可以使用 Mage.exe 來標記資料檔。You can also mark data files by using the Mage.exe. 如需詳細資訊,請參閱如何:在 ClickOnce 應用程式中納入資料檔案For more information, see How to: Include a data file in a ClickOnce application.

必要條件對話方塊Prerequisites dialog box

這個對話方塊會指定安裝哪些必備元件,以及安裝這些元件的方法。This dialog box specifies which prerequisite components are installed, as well as how they are installed. 如需詳細資訊,請參閱如何:使用 ClickOnce 應用程式安裝必要條件必要條件對話方塊For more information, see How to: Install prerequisites with a ClickOnce application and Prerequisites dialog box.

應用程式更新對話方塊Application Updates dialog box

這個對話方塊會指定應用程式安裝應該如何查看是否有更新。This dialog box specifies how the application installation should check for updates. 如需詳細資訊,請參閱如何:管理 ClickOnce 應用程式的更新For more information, see How to: Manage updates for a ClickOnce application.

發佈選項對話方塊Publish Options dialog box

[發行選項] 對話方塊會指定應用程式的部署選項。The Publish Options dialog box specifies an application's deployment options.

如何:變更 ClickOnce 應用程式的發佈語言How to: Change the publish language for a ClickOnce application 描述如何指定語言和文化特性,以符合當地語系化的版本。Describes how to specify a language and culture to match the localized version.
如何:指定 ClickOnce 應用程式的開始功能表名稱How to: Specify a Start menu name for a ClickOnce application 描述如何變更 ClickOnce 應用程式的顯示名稱。Describes how to change the display name for a ClickOnce application.
如何:指定技術支援的連結How to: Specify a link for Technical Support 描述如何設定支援 URL 屬性,其可識別使用者可以前往以取得應用程式相關資訊之網頁或檔案共用。Describes how to set the Support URL property, which identifies a Web page or file share where users can go to get information about the application.
如何:在 ClickOnce 部署中指定個別必要條件的支援 URLHow to: Specify a Support URL for individual prerequisites in a ClickOnce deployment 示範如何手動變更應用程式資訊清單,以包含每個必備項目的個別支援 URL。Demonstrated how to manually alter an application manifest to include individual support URLs for each prerequisite.
如何:指定 ClickOnce 應用程式的發佈頁面How to: Specify a publish page for a ClickOnce application 描述如何產生及發行預設網頁 (publish.htm) 以及應用程式Describes how to generate and publish a default Web page (publish.htm) along with the application
如何:自訂 ClickOnce 預設網頁How to: Customize the ClickOnce default Web page 描述如何自訂自動產生及發行的網頁以及應用程式。Describes how to customize the Web page that is automatically generated and published along with the application.
如何:啟用 CD 安裝的 AutoStartHow to: Enable AutoStart for CD installations 描述如何啟用 AutoStart,以便在插入媒體時,自動啟動 ClickOnce 應用程式。Describes how to enable AutoStart so that the ClickOnce application is automatically launched when the media is inserted.
標題Title 說明Description
如何:建立 ClickOnce 應用程式的檔案關聯How to: Create file associations For a ClickOnce application 描述如何將副檔名支援加入 ClickOnce 應用程式。Describes how to add file name extension support to a ClickOnce application.
如何:在線上 ClickOnce 應用程式中擷取查詢字串資訊How to: Retrieve query string information in an online ClickOnce application 示範如何擷取在 URL 中傳遞以執行 ClickOnce 應用程式的參數。Demonstrates how to retrieve parameters passed in the URL used to run a ClickOnce application.
如何:使用設計工具停用 ClickOnce 應用程式的 URL 啟動How to: Disable URL activation of ClickOnce applications by using the designer 描述如何強制使用者使用設計工具,從 [開始] 功能表啟動應用程式。Describes how to force users to start the application from the Start menu by using the designer.
如何:停用 ClickOnce 應用程式的 URL 啟動How to: Disable URL activation of ClickOnce applications 描述如何強制使用者從 [開始] 功能表啟動應用程式。Describes how to force users to start the application from the Start menu.
逐步解說:依需求使用設計工具以 ClickOnce 部署 API 下載組件Walkthrough: Downloading assemblies on demand with the ClickOnce deployment API using the Designer 描述如何只有在使用設計工具的應用程式第一次使用應用程式組件時,才下載這些組件。Explains how to download application assemblies only when they are first used by the application using the designer.
逐步解說:下載依需求以 ClickOnce 部署 API 的組件Walkthrough: Download assemblies on demand with the ClickOnce deployment API 說明如何只有在應用程式第一次使用應用程式組件時,才下載這些組件。Explains how to download application assemblies only when they are first used by the application.
逐步解說:下載依需求以 ClickOnce 部署 API 的附屬組件Walkthrough: Download satellite assemblies on demand with the ClickOnce deployment API 描述如何將您的附屬組件標記為選用項目,並僅下載用戶端電腦因其目前文化特性設定而需要的組件。Describes how to mark your satellite assemblies as optional, and download only the assembly a client machine needs for its current culture settings.
逐步解說:手動部署 ClickOnce 應用程式Walkthrough: Manually deploy a ClickOnce application 說明如何使用.NET Framework 公用程式,部署 ClickOnce 應用程式。Explains how to use .NET Framework utilities to deploy your ClickOnce application.
逐步解說:手動部署 ClickOnce 應用程式,而無須重新簽署而且會保留商標資訊Walkthrough: Manually deploy a ClickOnce application that does not require re-signing and that preserves branding information 說明如何使用 .NET Framework 公用程式,部署 ClickOnce 應用程式,但不重新簽署資訊清單。Explains how to use .NET Framework utilities to deploy your ClickOnce application without re-signing the manifests.
如何:將專案設定成以各種平台為目標How to: Configure projects to target platforms 說明如何透過變更專案中的 [目標 CPU] 或 [平台目標] 屬性,針對 64 位元處理器發佈。Explains how to publish for a 64-bit processor by changing the Target CPU or Platform target property in your project.
逐步解說:啟用多個.NET Framework 版本上執行 ClickOnce 應用程式Walkthrough: Enable a ClickOnce application to run on multiple .NET Framework versions 說明如何啟用 ClickOnce 應用程式,在 NET Framework 的多個版本上安裝及執行。Explains how to enable a ClickOnce application to install and run on multiple versions of the NET Framework.
逐步解說:建立自訂安裝程式的 ClickOnce 應用程式Walkthrough: Create a custom installer for a ClickOnce application 說明如何建立自訂安裝程式,來安裝 ClickOnce 應用程式。Explains how to create a custom installer to install a ClickOnce application.
如何:發佈已啟用視覺樣式的 WPF 應用程式How to: Publish a WPF application with visual styles enabled 提供逐步指示,解決在您嘗試發行啟用視覺化樣式的 WPF 應用程式時出現的錯誤。Provides step-by-step instructions to resolve an error that appears when you attempt to publish a WPF application that has visual styles enabled.

另請參閱See also