封裝應用程式Packaging apps

本節包含或連結至關於在 MSIX 和 .appx 應用程式套件中封裝通用 Windows 平台 (UWP) 應用程式的文章,以進行部署和安裝。This section contains or links to articles about packaging Universal Windows Platform (UWP) apps in MSIX and .appx app packages for deployment and installation. 其中一些連結會移至 MSIX 文件中的相關文章。Some of these links go to relevant articles in the MSIX documentation.

注意

Windows 10 中 UWP 應用程式的原始應用程式封裝格式為 .appx。The original app packaging format for UWP apps in Windows 10 was .appx. 從 Windows 10 版本 1809 開始,此封裝格式已重新命名為 .msix 並已延伸為支援所有類型的Windows 應用程式,包含 .NET 和 C++/Win32 桌面應用程式。Starting in Windows 10, version 1809, this packaging format was renamed to .msix and extended to support all types of Windows apps, including .NET and C++/Win32 desktop apps. MSIX 的支援也會延伸到舊版的 Windows。Support for MSIX is also being extended to earlier Windows versions. 如需詳細資訊,請參閱 MSIX 文件For more information, see the MSIX documentation.

主題Topic 描述Description
使用 Visual Studio 封裝 UWP 應用程式Package a UWP app with Visual Studio 若要發佈或銷售您的通用 Windows 平台 (UWP) 應用程式,您必須為其建立應用程式套件。To distribute or sell your Universal Windows Platform (UWP) app, you need to create an app package for it.
手動應用程式封裝Manual app packaging 如果想要建立並簽署應用程式套件,但是沒有使用 Visual Studio 來開發應用程式時,您必須使用手動應用程式封裝工具。If you want to create and sign an app package, but you didn't use Visual Studio to develop your app, you'll need to use the manual app packaging tools.
應用程式套件架構App package architectures 深入了解在建置應用程式套件時,應使用哪種處理器架構。Learn more about which processor architecture(s) you should use when building your app package.
UWP 應用程式串流安裝UWP App Streaming Install 您可以透過應用程式串流安裝,指定 Microsoft Store 優先下載的應用程式部分。App Streaming Install enables you to specify which parts of your app you would like the Microsoft Store to download first. 當應用程式的必要檔案獲得優先下載時,使用者可以直接啟動並與應用程式進行互動,同時讓剩餘的檔案在背景完成下載。When the essential files of the app are downloaded first, the user can launch and interact with the app while the rest of it finishes downloading in the background.
選用套件及相關集合的製作Optional packages and related set authoring 選用套件包含了可與主要套件整合的內容。Optional packages contain content that can be integrated with a main package. 這些選用套件相當適合用於可下載內容 (DLC)、將大型應用程式根據大小限制進行分割,或是傳送與您原始應用程式分離的額外內容。These are useful for downloadable content (DLC), dividing a large app for size restraints, or for shipping any additional content for separate from your original app.
具可執行程式碼的選用套件Optional packages with executable code 了解如何使用 Visual Studio 建立具可執行程式碼的選用套件。Learn how to use Visual Studio to create an optional package with executable code.
使用應用程式安裝程式安裝 Windows 10 應用程式Install Windows 10 apps with App Installer 應用程式安裝程式可讓您按兩下應用程式套件,安裝 Windows 10 應用程式。App Installer allows for Windows 10 apps to be installed by double clicking the app package.
使用 WinAppDeployCmd.exe 工具安裝應用程式Install apps with the WinAppDeployCmd.exe tool Windows 應用程式部署 (WinAppDeployCmd.exe) 是可以用來從 Windows 10 電腦將 UWP 應用程式部署到任何 Windows 10 行動裝置版裝置的命令列工具。Windows Application Deployment (WinAppDeployCmd.exe) is a command line tool that can use to deploy a UWP app from a Windows 10 machine to any Windows 10 Mobile device. 如果 Windows 10 行動裝置版裝置是透過 USB 連接,或可在相同的子網路上使用而不需要 Microsoft Visual Studio 或該應用程式適用的解決方案時,您就可以使用此工具來部署 .appx 套件。You can use this tool to deploy an app package when the Windows 10 Mobile device is connected by USB or available on the same subnet without needing Microsoft Visual Studio or the solution for that app. 本文章說明如何使用此工具安裝 UWP App。This article describes how to install UWP apps using this tool.
設定您的 UWP 應用程式的自動化組建Set up automated builds for your UWP app 如果您要在自動化建置程序中封裝您的 App,本主題示範如何使用 Visual Studio Team Services (VSTS) 來完成。If you want to package your app as part of an automated build process, this topic shows you how to use Visual Studio Team Services (VSTS) to do it.
應用程式功能宣告App capability declarations 必須在您的應用程式套件資訊清單中宣告功能,才能存取特定的 API 或資源 (如圖片、音樂),或是相機或麥克風等裝置。Capabilities must be declared in your app's package manifest to access certain API or resources like pictures, music, or devices like the camera or the microphone.
從 Microsoft Store 下載與安裝套件更新Download and install package updates from the Store 您的 UWP app 可以程式設計方式檢查套件更新並安裝更新。Your UWP app can programmatically check for package updates and install the updates. 您的應用程式也可以在合作夥伴中心上查詢已標示為強制性的套件,並在安裝強制更新之前停用功能。Your app can also query for packages that have been marked as mandatory in Partner Center and disable functionality until the mandatory update is installed.