選擇 UWP 版本Choose a UWP version

每一版的 Windows 10 都為 UWP 平台帶來了全新與改進的功能。Each version of Windows 10 has brought new and improved features to the UWP platform. 在 Microsoft Visual Studio 中建立 UWP 應用程式時,您可以選擇要以哪個版本為目標。When creating a UWP app in Microsoft Visual Studio, you can choose which version to target. 使用 .NET Standard 2.0 的專案必須擁有組建 16299 或更新版本的最小版本Projects using .NET Standard 2.0 must have a Minimum Version of Build 16299 or later.

警告

在新版 Visual Studio 中建立的任何 UWP 專案,都無法在 Visual Studio 2015 中開啟。UWP projects created in current versions of Visual Studio cannot be opened in Visual Studio 2015.

下表說明可用的 Windows 10 版本。The following table describes the available versions of Windows 10. 請注意,此表格僅適用於建置只有 Windows 10 支援的 UWP 應用程式。Please note that this table only applies for building UWP apps, which are only supported on Windows 10. 您無法為舊版 Windows 開發 UWP 應用程式,且必須已安裝適當的 SDK 組建,才能以該版本為目標。You cannot develop UWP apps for older versions of Windows, and you must have installed the appropriate build of the SDK in order to target that version.

版本Version 說明Description
組建 19041 (版本 2004)Build 19041 (version 2004) 這是 2020 年 5 月發行的最新 Windows 10 版本。This is the latest version of Windows 10, released in May 2020. 此版本的重點功能包括:Highlighted features of this release include:
* WSL2: Windows 子系統 Linux 版已使用新的架構模型進行更新,現在會在 Windows 上執行實際的 Linux 核心。* WSL2: Windows Subsystem for Linux has been updated with a new architectural model, and now runs an actual Linux kernal on Windows. 請在關於 WSL2 中深入了解。Learn more at about WSL2.
* MSIX: Windows 中的新功能可進一步支援新式 MSIX 應用程式封裝格式,包括能夠建立包含服務的套件、建立託管的應用程式,以及在非封裝應用程式中包含需要套件識別資料的功能。* MSIX: New features within Windows provide further support for the modern MSIX app packaging format, including the ability to create packages with included services, creation of hosted apps, and the ability to include features that require package identity in non-packaged apps. MSIX 文件中深入了解。Learn more in the MSIX docs.
如需這些功能及此版本 Windows 中所新增之其他多項功能的詳細資訊,請造訪開發人員中心,或是參閱更深入的 Windows 10 中適用於開發人員的新增功能頁面For more information on these and the many other features added in this release of Windows, visit the Dev Center or the more in-depth page on What's new in Windows 10 for developers
組建 18362 (版本 1903)Build 18362 (version 1903) 此版本的 Windows 10 於 2019 年 4 月發行。This version of Windows 10 was released in April 2019. 此版本的一些重點功能包括:Some highlighted features from this release include:
* XAML Islands: Windows 10 現在可讓您在非 UWP 傳統型應用程式中使用 UWP 控制項。* XAML Islands: Windows 10 now enables you to use UWP controls in non-UWP desktop applications. 如果您正在開發的 WPF、Windows Forms 或 C++Win32,請查看如何將最新的 Windows 10 UI 功能新增至現有的應用程式If you’re developing for WPF, Windows Forms, or C++ Win32, check out how you can add the latest Windows 10 UI features to your existing app.
* Windows 子系統 Linux 版: 您現在可以直接從 Windows 存取 Linux 檔案,並使用數個新的命令列選項。* Windows Subsystem for Linux: You can now access Linux files directly from within Windows, and use several new command line options. 請參閱關於 WSL 的最新資訊。See the latest at about WSL.
如需這些功能及此版本 Windows 中所新增之其他多項功能的相關資訊,請造訪組建 18362 中的新功能For information on these and many other features added in this release of Windows, visit What's new in build 18362
組建 17763 (版本 1809)Build 17763 (version 1809) 此版本的 Windows 10 於 2018 年 11 月發行。This version of Windows 10 was released in October 2018. 請注意,您「必須」使用 Visual Studio 2017 或 Visual Studio 2019,才能以這個版本的 Windows 為目標。Please note that you must be using Visual Studio 2017 or Visual Studio 2019 in order to target this version of Windows. 此版本的一些重點功能包括:Some highlighted features from this release include:
* Windows Machine Learning: Windows Machine Learning 已正式推出,可為尖端機器學習模型提供更快速的評估和支援。* Windows Machine Learning: Windows Machine Learning has now officially launched, providing features like faster evaluation and support for cutting-edge machine learning models. 若要深入了解此平台,請參閱 Windows Machine LearningTo learn more about the platform, see Windows Machine Learning.
* Fluent Design: Windows 10 已新增一些新功能,例如功能表列、命令列飛出視窗和 XAML 屬性動畫。* Fluent Design: New features such as menu bar, command bar flyout, and XAML property animations have been added to Windows 10. 請至 Fluent Design 概觀查看最新消息。See the latest at the Fluent design overview.
如需這些功能及此版本 Windows 中所新增之其他多項功能的相關資訊,請造訪 組建 17763 中的新功能For information on these and many other features added in this release of Windows, visit What's new in build 17763
組建 17134 (版本 1803)Build 17134 (version 1803) 此版本的 Windows 10 於 2018 年 4 月發行。This is version of Windows 10 was released in April 2018. 請注意,您「必須」使用 Visual Studio 2017 或 Visual Studio 2019,才能以這個版本的 Windows 為目標。Please note that you must be using Visual Studio 2017 or Visual Studio 2019 in order to target this version of Windows. 此版本的一些重點功能包括:Some highlighted features from this release include:
* Fluent Design: Windows 10 中已新增樹狀檢視、拖動重新整理及瀏覽檢視等新功能。* Fluent Design: New features such as tree view, pull-to-refresh, and navigation view have been added to Windows 10. 請至 Fluent Design 概觀查看最新消息。See the latest at the Fluent design overview.
* 主控台 UWP 應用程式: 您現在可以撰寫執行於主控台視窗 (例如 DOS 或 PowerShell 主控台視窗) 中的 C++ /WinRT 或 /CX UWP 主控台應用程式。* Console UWP apps: You can now write C++ /WinRT or /CX UWP console apps that run in a console window such as a DOS or PowerShell console window.
如需這些功能及此版本 Windows 中所新增之其他多項功能的相關資訊,請造訪組建 17134 中的新功能For information on these and many other features added in this release of windows, visit What's new in build 17134
組建 16299 (Fall Creators Update,版本 1709)Build 16299 (Fall Creators Update, version 1709) 此版本的 Windows 10 於 2017 年 10 月發行。This verion of Windows 10 was released in October 2017. 請注意,您「必須」使用 Visual Studio 2017 或 Visual Studio 2019,才能以這個版本的 Windows 為目標。Please note that you must be using Visual Studio 2017 or Visual Studio 2019 in order to target this version of Windows. 此版本的一些重點功能包括:Some highlighted features from this release include:
* .NET Standard 2.0: 包含大量增加的 .NET API 並將您最愛的 NuGet 套件和第三方程式庫納入 .NET Standard。* .NET Standard 2.0: Enjoy a massive increase in the number of .NET APIs and incorporate your favorite NuGet packages and third party libraries into .NET Standard. 請至這裡查看更多詳細資料並瀏覽文件。See more details and explore the documentation here. 請注意,您必須將最小版本設定為組建 16299,才能存取這些新的 API。Please note that you must set your minimum version to Build 16299 to access these new APIs.
* Fluent Design: 使用光線、深度、透視以及移動來增強您的應用程式,並協助使用者專注於重要的 UI 元素。* Fluent Design: Use light, depth, perspective, and movement to enhance your app and help users focus on important UI elements.
* 條件式 XAML: 輕鬆設定屬性,並根據執行階段是否存在 API 來起始物件,讓您的應用程式在各裝置和版本間順暢執行。* Conditional XAML: Easily set properties and instantiate objects based on the presence of an API at runtime, enabling your apps to run seamlessly across devices and versions.
如需這些功能及此版本 Windows 中所新增之其他多項功能的相關資訊,請造訪 適用於開發人員的 Windows 10 之新功能For information on these and many other features added in this release of windows, visit What's new in Windows 10 for developers
組建 15063 (Creators Update,版本 1703)Build 15063 (Creators Update, version 1703) 此版本的 Windows 10 於 2017 年 3 月發行。This version of Windows 10 was released in March 2017. 請注意,您「必須」使用 Visual Studio 2017 或 Visual Studio 2019,才能以這個版本的 Windows 為目標。Please note that you must be using Visual Studio 2017 or Visual Studio 2019 in order to target this version of Windows. 此版本的一些重點功能包括:Some highlighted features from this release include:
* 筆跡分析: Windows Ink 現在可以將筆墨筆劃分類為書寫或繪圖筆劃,並辨識文字、形狀和基本配置結構。* Ink Analysis: Windows Ink can now categorize ink strokes into either writing or drawing strokes, and recognized text, shapes, and basid layout structures.
* Windows.Ui.Composition API: 輕鬆地結合並套用您的應用程式之間的動畫。* Windows.Ui.Composition APIs: Easily combine and apply animations across your app.
* 即時編輯: 在應用程式執行時同時編輯 XAML,並即時看見所套用的變更。* Live Editing: Edit XAML while your app is running, and see the changes applied in real-time.
如需這些功能及此版本 Windows 中所新增之其他多項功能的相關資訊,請造訪組建 15063 中的新功能For information on these and many other features added in this release of windows, visit What's new in build 15063
組建 14393 (年度更新版,版本 1607)Build 14393 (Anniversary Update, version 1607) 此版本的 Windows 10 於 2016 年 7 月發行。This version of Windows 10 was released in July 2016. 此版本的一些重點功能包括:Some highlighted features from this release include:
* Windows Ink: 新的 InkCanvas 和 InkToolbar 控制項。* Windows Ink: New InkCanvas and InkToolbar controls.
* Cortana API: 使用新的 Cortana 動作來將 Cortana 支援與您應用程式的特定功能整合。* Cortana APIs: Use new Cortana Actions to integrate Cortana support with specific functions of your app.
* Windows Hello: Microsoft Edge 現在支援 Windows Hello,提供網頁開發人員存取生物識別驗證。* Windows Hello: Microsoft Edge now supports Windows Hello, giving web developers access to biometric authentication.
如需這些功能及此版本 Windows 中所新增之其他多項功能的相關資訊,請造訪組建 14393 中的新功能For information on these and many other features added in this release of windows, visit What's new in build 14393
組建 10586 (11 月更新,版本 1511)Build 10586 (November Update, version 1511) 此版本的 Windows 10 發行於 2015 年 11 月。This version of Windows 10 was released in November 2015. 重點功能包括為 Microsoft Edge 和提供者 API 中的影片通訊推出 ORTC (物件即時通訊) API,讓 App 可以使用 Windows Hello 臉部驗證。Highlighted features include the introduction of ORTC (object real-time communications) APIs for video communication in Microsoft Edge and Providers APIs to enable apps to use Windows Hello face authentication. 於此組建推出之功能的詳細資訊。More information on features introduced in this build.
Build 10240 (Windows 10,版本 1507)Build 10240 (Windows 10, version 1507) 這是 2015 年 7 月發行的初始 Windows 10 版本。This is the initial release version of Windows 10, from July 2015. 於此組建推出之功能的詳細資訊。More information on features introduced in this build.

強烈建議新的開發人員與針對一般大眾撰寫程式碼的開發人員一律使用最新的 Windows 組建 (19041)。We highly recommend that new developers and developers writing code for a general audience always use the latest build of Windows (19041). 撰寫企業應用程式的開發人員應強烈考慮支援較舊的 [最小版本]。Developers writing Enterprise apps should strongly consider supporting an older Minimum Version.

每個 UWP 版本有何差異?What's different in each UWP version?

每個 Windows 10 後繼版本都可使用適用於 UWP 的新 API 和已變更的 API。New and changed APIs for UWP are available in every successive version of Windows 10. 如需有關哪個版本中新增了哪些功能的特定資訊,請參閱 Windows 10 提供給開發人員的新功能For specific information about what features were added in which version, see What's new for developers in Windows 10.

如需列舉出所有裝置系列及其版本和所有 API 協定及其版本的參考主題,請參閱裝置系列API 協定For reference topics that enumerate all device families and their versions, and all API contracts and their versions, see Device families and API contracts.

在 UWP 版本的 .NET API 可用性.NET API availability in UWP versions

UWP 支援有限的 .NET API 子集,不論您專案的目標版本最低版本為何都可使用。UWP supports a limited subset of .NET APIs, which are available regardless of the Target Version or Minimum Version of your project. 此頁面提供有關可用類型的詳細資訊This page provides more information on the types available.

如果您想要建立可重複使用的跨平台程式庫,則 UWP 支援 .NET Standard。If you wish to create reusable cross-platform libraries, .NET Standard is supported on UWP. .NET Standard 文件提供哪些 UWP 版本支援 .NET Standard 的資訊。The .NET Standard documentation provides information on which .NET Standard is supported in which UWP versions.

如果您正在開發傳統型應用程式,請改為參數 .NET Framework 版本和相依性,以取得 .NET Framework 可用性的詳細資訊。If you are developing a Desktop app, see instead .NET Framework versions and dependencies for detailed information on .NET framework availability.

選擇要針對您 App 使用的版本Choose which version to use for your app

在 Visual Studio 中的 [新增通用 Windows 專案] 對話方塊中,您可以為 [目標版本] 和 [最小版本] 選擇版本。In the New Universal Windows Project dialog in Visual Studio, you can choose a version for Target Version and for Minimum Version. 此外,您可以在應用程式其 [屬性] 的 [應用程式] 區段中,變更 UWP 應用程式的 [目標版本] 和 [最小版本]。Additionally, you can change the Target Version and Minimum Version of your UWP app in the application section of the app's Properties.

  • 目標版本Target Version. 您的應用程式打算在其上執行的 Windows 10 版本。The version of Windows 10 that your app is intended to run on. 這會設定您專案檔中的 TargetPlatformVersion 設定。This sets the TargetPlatformVersion setting in your project file. 它也會決定您應用程式套件資訊清單中 *TargetDeviceFamily@MaxVersionTested* 屬性的值。It also determines the value of the *TargetDeviceFamily@MaxVersionTested* attribute in your app package manifest. 您選擇的值會指定您專案的目標 UWP 平台版本,也因此會決定您 App 可用的一組 API,所以我們建議您選擇可能的最新版本。The value you choose specifies the version of the UWP platform that your project is targeting—and therefore the set of APIs available to your app—so we recommend that you choose the most recent version possible. 如需有關您應用程式套件資訊清單的詳細資訊,以及一些有關手動設定 TargetDeviceFamily 指導方針,請參閱 TargetDeviceFamilyFor more info about your app package manifest, and some guidelines around configuring TargetDeviceFamily manually, see TargetDeviceFamily.
  • 最小版本Minimum Version. 支援應用程式基本功能所需的最舊 Windows 10 版本。The earliest version of Windows 10 needed to support the basic functions of your app. 這會設定您專案檔中的 TargetPlatformMinVersion 設定。This sets the TargetPlatformMinVersion setting in your project file. 它也會決定您應用程式套件資訊清單中 *TargetDeviceFamily@MinVersion* 屬性的值。It also determines the value of the *TargetDeviceFamily@MinVersion* attribute in your app package manifest. 您選擇的值會指定您專案可搭配運作的 UWP 平台最小版本。The value you choose specifies the minimum version of the UWP platform that your project can work with.

請注意,您宣告的是您的應用程式可以在從 [最小版本] 到 [目標版本] 範圍內的任何 Windows 版本上運作。Be aware that you're declaring that your app works on any version of Windows in the range from Minimum Version to Target Version. 如果這兩者是相同版本,您就不需要採取任何特別的動作。If those two are the same version then you don't need to do anything special. 如果兩者不同,則以下是一些需要注意的事項。If they're different then here are some things to be aware of.

  • 在您的程式碼中,您可以自由地 (也就是沒有條件檢查) 呼叫存在於 [最小版本] 所指定版本中的任何 API。In your code, you can freely (that is, without conditional checks) call any API that exists in the version specified by Minimum Version.
  • 確定您是在執行 [最小版本] 的裝置上測試程式碼,以確保它無需僅在 [目標版本] 中提供的 API 也可正常運作。Ensure that you test your code on a device running the Minimum Version, to be sure that it works without requiring APIs only present in the Target Version.
  • [目標版本] 的值可用來識別所有用來編譯您專案的參考 (協定 winmds)。The value of Target Version is used to identify all the references (contract winmds) used to compile your project. 但這些參考將可讓您在編譯您的程式碼時,使用不一定存在於您所宣告支援之裝置上的 API 呼叫 (透過 [最小版本]) 來進行編譯。But those references will enable you to compile your code with calls to APIs that won't necessarily exist on devices that you've declared that you support (via Minimum Version). 因此,呼叫在 [最小版本] 之後引進的 API 時,將需要透過調適型程式碼來呼叫。Therefore, any API that was introduced after Minimum Version will need to be called via adaptive code. 如需調適型程式碼的相關詳細資訊,請參閱版本調適型程式碼For more information about adaptive code, see Version adaptive code.