Windows application software development

Build desktop apps for Windows PCs

This article provides the info you need to get started building desktop apps for Windows or updating existing desktop apps to adopt the latest experiences in Windows 10.

Platforms for desktop apps

There are four main platforms for building desktop apps for Windows PCs. Each platform provides an app model that defines the lifecycle of the app, a complete UI framework and set of UI controls that let you create desktop apps like Word, Excel, and Photoshop, and access to a comprehensive set of managed or native APIs for using Windows features.

For an in-depth comparison of these platforms along with additional resources for each platform, see Choose your app platform.

The leading-edge platform for Windows 10 apps and games. You can build UWP apps that exclusively use UWP controls and APIs, or you can use UWP controls and APIs in desktop apps that are built using one of the other platforms.

The platform of choice for native Windows apps that require direct access to Windows and hardware.

The established .NET-based platform for graphically-rich managed Windows apps with a XAML UI model. These apps can target .NET Core 3 or the full .NET Framework.

A .NET-based platform that is designed for managed line-of-business apps with a lightweight UI model. These apps can target .NET Core 3 or the full .NET Framework.

Future roadmap

Looking forward, we are evolving the Windows app development platforms with the Windows UI Library (WinUI) and Project Reunion.

WinUI is a native user experience (UX) framework for Windows 10 apps. WinUI started as a toolkit that provides new and updated versions of WinRT controls for UWP apps that target down-level versions of Windows 10. As of WinUI 3, WinUI is growing in scope to become the premier native user interface (UI) framework for Windows 10 apps across UWP, .NET, and Win32 app platforms.

Project Reunion is the code name for a broad set of new developer components and tools that represents the next evolution in the Windows app development platform. Project Reunion provides a unified set of APIs and tools that can be used in a consistent way by any app on a broad set of target Windows 10 OS versions. Project Reunion complements existing Windows app platforms and frameworks such as UWP and native Win32, and .NET with a common set of APIs and tools that developers can rely on across these platforms.

For more information, see Project Reunion.

Update existing desktop apps for Windows 10

If you have an existing WPF, Windows Forms, or native Win32 desktop app, Windows 10 and the Universal Windows Platform (UWP) offer many features you can use to deliver a modern experience in your app. Most of these features are available as modular components that you can adopt in your app at your own pace without having to rewrite your app for a different platform.

Here are just a few of the features available to enhance your existing desktop apps:

  • Use MSIX to package and deploy your desktop apps. MSIX is a modern Windows app package format that provides a universal packaging experience for all Windows apps. MSIX brings together the best aspects of MSI, .appx, App-V and ClickOnce installation technologies and is built to be safe, secure, and reliable.
  • Integrate your desktop app with Windows 10 experiences by using package extensions. For example, point Start tiles to your app, make your app a share target, or send toast notifications from your app.
  • Use XAML Islands to host UWP XAML controls in your desktop app. Many of the latest Windows 10 UI features are only available to UWP XAML controls.

For more information, see these articles.

Platform Description Docs and resources
Universal Windows Platform (UWP)
Article Description
Modernize desktop apps Describes the latest Windows 10 and UWP development features you can use in any desktop app, including WPF, Windows Forms, and C++ Win32 apps.
Tutorial: Modernize a WPF app Follow step-by-step instructions to modernize an existing WPF line-of-business sample app by adding UWP Ink and calendar controls to the app and packaging it in an MSIX package.

Create new desktop apps

If you are creating a new desktop app for Windows, here are some resources to help get you started.

Подготовка Get set up

Давайте приступим к разработке приложений для Windows 10. Welcome to Windows 10 development! Следуйте этим инструкциям и приступите к созданию приложений для Windows 10 с помощью API-интерфейсов WinRT (также известных как универсальная платформа Windows или UWP). Follow these instructions and start creating apps for Windows 10, using WinRT APIs (also known as the Universal Windows Platform or UWP).

1. Скачайте или обновите Visual Studio 1. Download or update Visual Studio

Новые версии Visual Studio могут выглядеть иначе, чем снимки экрана, которые сопровождают эти инструкции. New versions of Visual Studio might look different than the screenshots that accompany these instructions. Не беспокойтесь. Don’t worry! Вы все равно сможете все настроить, следуя этим инструкциям. You’ll still be set up if you follow these instructions.

Microsoft Visual Studio 2019 помогает в проектировании, программировании, тестировании и отладке приложений. Microsoft Visual Studio 2019 helps you design, code, test, and debug your apps.

Если у вас еще нет Visual Studio 2019, вы можете установить бесплатную среду Microsoft Visual Studio Community 2019. If you don’t already have Visual Studio 2019, you can install the free Microsoft Visual Studio Community 2019. В этот скачиваемый пакет входят симуляторы устройств для тестирования приложений: This download includes device simulators for testing your apps:

При установке Visual Studio обязательно выберите параметр «Средства разработки универсальных приложений для Windows», как показано ниже. When you install Visual Studio, make sure to select the Universal Windows App Development Tools option, as shown here:

Нужна помощь в использовании Visual Studio? Need some help with Visual Studio? См. статью Начало работы с Visual Studio. See Get Started with Visual Studio.

Вы уже начали работать с Visual Studio, но обнаружили, что некоторых компонентов не хватает? Вы можете запустить установщик снова из диалогового окна Создание проекта. If you have already started using Visual Studio, but discover you are missing some components, you can launch the installer again from the New project dialog:

2. Подготовьте устройство к разработке 2. Enable your device for development

Важно протестировать приложения UWP на настоящих компьютерах и телефонах. It’s important to test your UWP apps on real PCs and phones. Чтобы начать развертывание приложений на компьютер или в Windows Phone, необходимо включить его для разработки. Before you can deploy apps to your PC or Windows Phone, you have to enable it for development.

3. Зарегистрируйтесь в качестве разработчика приложений 3. Register as an app developer

Вы можете начать разработку приложений прямо сейчас, но прежде чем вы сможете их отправлять в магазин, вам понадобится учетная запись разработчика. You can start developing apps now, but before you can submit them to the store, you need a developer account.

  • Чтобы получить учетную запись разработчика, перейдите на страницу регистрации. To get a developer account, go to the Sign up page.

Дальнейшие действия What’s next?

После установки инструментов и активации устройства для разработки ознакомьтесь с инструкциями по созданию приложений для Windows 10. After you’ve installed the tools and enabled your device for development, check out our guidance on how to start creating Windows 10 apps.

Сценарии настройки среды разработки для Windows Windows development setup scripts

Если вы хотите настроить устройство и установить другие компоненты и пакеты, ознакомьтесь со сценариями настройки системы в этом проекте. If you want to customize your device and install other features or packages, check out this project for system setup scripts.

Нужны дополнительные инструменты и скачиваемые файлы? Want more tools and downloads?

Полный список инструментов и скачиваемых файлов см. на странице скачиваемых файлов. For the complete list of tools and downloads, see Downloads.

Windows 10 SDK

The Windows 10 SDK (10.0.19041.0) for Windows 10, version 2004 provides the latest headers, libraries, metadata, and tools for building Windows 10 apps.

Use this SDK to build Universal Windows Platform (UWP) and Win32 applications for Windows 10, version 20H2 and previous Windows releases.

Windows 10, version 20H2 is a scoped set of features for select performance improvements and quality enhancements. Developers should be aware of this release, but no action is necessary at this time.

A new Windows SDK will not be issued to accompany this version of Windows because this release doesn’t introduce new APIs. That means there’s no need to modify your project files or target a new version of Windows, and you should continue to use the Windows 10 SDK for Windows 10, version 2004. When setting the target version for your Windows app, Windows 10 build 19041 is still the most recent target version.

Getting started

You can get the Windows 10 SDK in two ways: install it from this page by selecting the download link or by selecting “Windows 10 SDK (10.0.19041.0)” in the optional components of the Visual Studio 2019 Installer.

Before you install this SDK:

System requirements

The Windows SDK has the following minimum system requirements:

Supported operating systems

  • Universal Windows Platform (UWP) app development
    • Windows 10 version 1507 or higher: Home, Professional, Education, and Enterprise (LTSB and S are not supported)
    • Windows Server 2019, Windows Server 2016 and Windows Server 2012 R2 (Command line only)
  • Win32 app development
    • Windows 10 version 1507 or higher
    • Windows Server 2019, Windows Server 2016, and Windows Server 2012 R2 (Command line only)
    • Windows 8.1
    • Windows 7 SP1

(Not all tools are supported on earlier operating systems)

Hardware requirements

  • 1.6 GHz or faster processor
  • 1 GB of RAM
  • 4 GB of available hard disk space

Additional SDK requirements

Installation on Windows 8.1 and earlier operating systems requires KB2999226. To install through Windows Update, make sure you install the latest recommended updates and patches from Microsoft Update before you install the Windows SDK.

What’s new

The Windows 10 SDK for Windows 10, version 2004 offers exciting new APIs and updated tools for developing your Windows applications. Learn more about the new features in Windows 10, version 2004.

To see the new APIs introduced with Windows 10, version 2004, see: What’s new in Windows 10 for developers, build 19041.

Removal of api-ms-win-net-isolation-l1-1-0.lib

In this release api-ms-win-net-isolation-l1-1-0.lib has been removed from the Windows SDK. Apps that were linking against api-ms-win-net-isolation-l1-1-0.lib can switch t OneCoreUAP.lib as a replacement.

Removal of irprops.lib

In this release irprops.lib has been removed from the Windows SDK. Apps that were linking against irprops.lib can switch to bthprops.lib as a drop-in replacement.

Removal of wuapicommon.h and wuapicommon.idl

In this release we have moved ENUM tagServerSelection from wuapicommon.h to wupai.h and removed the header. If you would like to use the ENUM tagServerSelection, you will need to include wuapi.h or wuapi.idl.

Windows 10 WinRT API Pack

The Windows 10 WinRT API Pack lets you add the latest Windows Runtime APIs support to your .NET Framework 4.5+ and .NET Core 3.0+ libraries and apps. To access the Windows 10 WinRT API Pack, see the Microsoft.Windows.SDK.Contracts nuget package.

Universal C Runtime (UCRT)

The printf family of functions now conforms with the IEEE 754 rounding rules when printing exactly representable floating-point numbers and will honor the rounding mode requested via calls to fesetround. Legacy behavior is available when linking with legacy_stdio_float_rounding.obj.

Tools

Windows App Certification Kit

In this release of the Windows SDK, several new APIs were added to the Supported APIs list in the App Certification Kit and Windows Store. If there are APIs in the supported list that appear greyed out or disabled in Visual Studio, you can make a small change to your source file, to access them. For more details, see this known issue.

In addition to adding APIs, the following changes have been made to the tests:

Updated tests:

  • ValidateContentUriRules will be informational only. Test failures will be presented as warnings.

Removed tests

  • WebView WinRT access test for web app
  • PackageSizeCheck test for UWP apps
  • SupportedApi test for Desktop Bridge apps
  • AppContainerCheck test from BinScope for UWP apps
  • ServiceWorker check for all app types

New tests

  • High-DPI test. A new test for Desktop Bridge apps checks if the app uses DPI aware feature and warns if not specified. This test will encourage you to make your app per-monitor DPI aware. For details on DPI see High DPI Desktop Application Development on Windows.

Message Compiler (mc.exe)

Updates include:

  • Now detects the Unicode byte order mark (BOM) in .mc files. If the .mc file starts with a UTF-8 BOM, it will be read as a UTF-8 file. Otherwise, if it starts with a UTF-16LE BOM, it will be read as a UTF-16LE file. If the -u parameter was specified, it will be read as a UTF-16LE file. Otherwise, it will be read using the current code page (CP_ACP).
  • Now avoids one-definition-rule (ODR) problems in MC-generated C/C++ ETW helpers caused by conflicting configuration macros (e.g. when two .cpp files with conflicting definitions of MCGEN_EVENTWRITETRANSFER are linked into the same binary, the MC-generated ETW helpers will now respect the definition of MCGEN_EVENTWRITETRANSFER in each .cpp file instead of arbitrarily picking one or the other).

Windows Trace Preprocessor (tracewpp.exe)

Updates include:

  • Now supports Unicode input (.ini, .tpl, and source code) files. Input files starting with a UTF-8 or UTF-16 byte order mark (BOM) will be read as Unicode. Input files that do not start with a BOM will be read using the current code page (CP_ACP). For backwards-compatibility, if the -UnicodeIgnore command-line parameter is specified, files starting with a UTF-16 BOM will be treated as empty.
  • Now supports Unicode output (.tmh) files. By default, output files will be encoded using the current code page (CP_ACP). Use command-line parameters -cp:UTF-8 or -cp:UTF-16 to generate Unicode output files.
  • Behavior change: tracewpp now converts all input text to Unicode, performs processing in Unicode, and converts output text to the specified output encoding. Earlier versions of tracewpp avoided Unicode conversions and performed text processing assuming a single-byte character set. This may lead to behavior changes in cases where the input files do not conform to the current code page. In cases where this is a problem, consider converting the input files to UTF-8 (with BOM) and/or using the -cp:UTF-8 command-line parameter to avoid encoding ambiguity.

TraceLoggingProvider.h

Updates include:

  • Now avoids one-definition-rule (ODR) problems caused by conflicting configuration macros (e.g. when two .cpp files with conflicting definitions of TLG_EVENT_WRITE_TRANSFER are linked into the same binary, the TraceLoggingProvider.h helpers will now respect the definition of TLG_EVENT_WRITE_TRANSFER in each .cpp file instead of arbitrarily picking one or the other).
  • In C++ code, the TraceLoggingWrite macro has been updated to enable better code sharing between similar events using variadic templates.

Signing your apps with Device Guard Signing

We are making it easier for you to sign your app. Device Guard signing is a Device Guard feature that is available in Microsoft Store for Business and Education. Signing allows enterprises to guarantee every app comes from a trusted source. Our goal is to make signing your MSIX package easier. See the documentation about Device Guard Signing.

Samples

Windows 10 app samples are now available through GitHub. You can browse the code on GitHub, clone a personal copy of the repository from Git, or download a zipped archive of all the samples. We welcome feedback, so feel free to open an issue within the repository if you have a problem or question. These samples are designed to run on desktop, mobile, and future devices that support the Universal Windows Platform (UWP).

Previous SDK versions

Previously released SDKs and emulators, including update details, can be found on the archive page.

API Light Up

When you use new APIs, consider writing your app to be adaptive so that it runs correctly on the widest array of Windows 10 devices. An adapative app «lights up» with new features wherever the devices and Windows version supports them, but otherwise offers only the functionality available on the detected platform version. For implementation details, see the Version adaptive code article.

Release notes & Known Issues

The Windows 10 SDK, Version 2004 SDK servicing update (released 12/16/2020) contains the following fixes. If you encounter these issues, we recommend that you update your version of the SDK as soon as possible to avoid them:

  • Resolved unpredictable and hard to diagnose crashes when linking both umbrella libraries and native OS libraries (for example, onecoreuap.lib and kernel32.lib)
  • Resolved issue that prevented AppVerifier from working
  • Resolved issue that caused WACK to fail with “Task failed to enable HighVersionLie”

For known issues, see the winapi-sdk Q&A.

For new developer feature requests, submit through the Feedback Hub app under the category “Developer Platform/API.”

More resources

Downloads and tools

Get the latest editions of Visual Studio and Windows 10 development tools.

SDK archive

Find previous releases of the Window SDK and other tools.

Windows blog

Stay in touch with the latest SDK flights by subscribing to our blog.

Windows lifecycle fact sheet

Find the key dates for Windows release updates and end of support.

Читайте также:  Драйвер для принтера hp deskjet f380 драйвер для windows
Оцените статью