Windows wdk with visual studio

Other WDK downloads

This topic contains information about earlier versions of the Windows Driver Kit (WDK), Enterprise WDK (EWDK), and additional downloads for support purposes. To develop drivers, use the latest public versions of the Windows Driver Kit (WDK) and tools, available for download on Download the Windows Driver Kit (WDK).

The Windows Driver Kit (WDK) is used to develop, test, and deploy Windows drivers. To develop drivers, use the latest public versions of the Windows Driver Kit (WDK) and tools, available for download on Download the Windows Driver Kit (WDK).

This topic contains information about earlier versions of the WDK, the Enterprise WDK (EWDK), and additional downloads for support purposes. To use these earlier versions, you must first install the version of Visual Studio that is appropriate for your targeted platform.

Runtime requirements

You can run the Windows 10, version 1903 WDK on Windows 7 and later, and use it to develop drivers for these operating systems:

Client OS Server OS
Windows 10 Windows Server 2019, Windows Server 2016
Windows 8.1 Windows Server 2012 R2
Windows 8 Windows Server 2012
Windows 7 Windows Server 2008 R2 SP1

Step 1: Install Visual Studio

The WDK requires Visual Studio. For more information about system requirements for Visual Studio, see Visual Studio 2019 System Requirements.

The following table indicates which Visual Studio version is required for the different releases of the WDK.

Targeted versions of Windows Edition(s) of Visual Studio
Windows 10, version 1903 Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8 Visual Studio Professional 2012
Visual Studio Ultimate 2012

Configure Visual Studio for Windows 10, versions 1709, 1803, 1809 and 1903

When you install Visual Studio, select the Desktop development with C++ workload. The Windows 10 Software Development Kit (SDK) is automatically included and is displayed in the right-hand Summary pane.

To develop drivers for ARM/ARM64, choose Individual components and under Compilers, build tools, and runtimes select Visual C++ compilers and libraries for ARM/ARM64.

Install the Windows SDK to target Windows 10, versions 1607 and 1703

If your development targets systems that run Windows 10, version 1607 or Windows 10, version 1703, you should install Visual Studio 2015, and then also download and install the version of the Windows SDK for the targeted version of Windows 10, as identified in the following table.

Targeted versions of Windows Version of Windows SDK
Windows 10, version 1703 Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607 Windows SDK for Windows 10.0.14393.795
Windows 8.1 Windows SDK for Windows 8.1
Windows 8 Windows SDK for Windows 8

The Windows SDK was not included in Visual Studio 2015, so you must install the SDK separately. Later versions of Visual Studio include the Windows SDK.

Step 2: Install the WDK

The WDK is integrated with Visual Studio and Debugging Tools for Windows (WinDbg). This integrated environment gives you the tools you need to develop, build, package, deploy, test, and debug drivers.

Starting with Windows 10, version 1709, installing the WDK will by default install the WDK extensions for Visual Studio. These extensions are required for integration of the WDK with Visual Studio.

Versions of Windows WDK and related downloads
Windows 10, version 2004 WDK for Windows 10, version 2004 (10.1094.1)* See Note below
Windows 10, version 1903 WDK for Windows 10, version 1903
Windows 10, version 1809 WDK for Windows 10, version 1809
Windows 10, version 1803 WDK for Windows 10, version 1803
Windows 10, version 1709 WDK for Windows 10, version 1709
Windows 10, version 1703 WDK for Windows 10, version 1703
Windows 10, version 1607 WDK for Windows 10, version 1607
Windows 8.1 Update WDK 8.1 Update (English only) — temporarily unavailable
WDK 8.1 Update Test Pack (English only) — temporarily unavailable
WDK 8.1 Samples
Windows 8 WDK 8 (English only)
WDK 8 redistributable components (English only)
WDK 8 Samples
Windows 7 WDK 7.1.0

Please review Hardware development kits for Windows 10, Version 2004, which addresses a bug with ExAllocatePoolZero.

If you have installed the WDK for Windows 10, version 1703 on a system that had the WDK for Windows 10, version 1607 installed, some files from the earlier version of the WDK might have been removed. To restore these files:

  1. On the Start menu, enter Apps & features in the search box, and select Apps & features from the results.
  2. Find Windows Driver Kit — Windows 10.0.15063.0 in the list of Apps & Features, and then select the program.
  3. Select Modify, select Repair, and then follow the directions on the screen.
  4. The files will be restored.

Optional: Install the EWDK

The Enterprise WDK (EWDK) is a standalone, self-contained, command-line environment for building drivers and basic Win32 test applications. It includes the Visual Studio Build Tools, the SDK, and the WDK. This environment doesn’t include all the features available in Visual Studio, such as the integrated development environment (IDE).

Using the EWDK requires .NET Framework 4.6.1. For more information about which systems run this version of the framework, see .NET Framework system requirements. For links to download the .NET Framework, see Install the .NET Framework for developers.

For more information about the EWDK, see Using the Enterprise WDK 10.

Versions of Windows EWDK
Windows 10, version 1903 EWDK for Windows 10, version 1903
Windows 10, version 1809 EWDK for Windows 10, version 1809
Windows 10, version 1803 EWDK for Windows 10, version 1803
Windows 10, version 1709 EWDK for Visual Studio with Build Tools 15.6 (Recommended)
EWDK for Visual Studio with Build Tools 15.4
EWDK for Visual Studio with Build Tools 15.2
Windows 10, version 1703 EWDK for Windows 10, version 1703

Starting in Windows 10 version 1709, the EWDK is ISO-based. To get started, download and mount the ISO, and then run LaunchBuildEnv.

Optional: Install updated test certificates for HAL extensions

To work with HAL Extensions, prepare your development system, running Windows 10, version 1709 or a later version of Windows 10. Also install the WDK or the EWDK, and then install the updated version of the Windows OEM HAL Extension Test Cert 2017 (TEST ONLY), available for download as a ZIP file: HAL_Extension_Test_Cert_2017.zip.

For more information about using this updated certificate, see Update for «Windows OEM HAL Extension Test Cert 2017 (TEST ONLY)» test certificate on Windows Support.

Optional: Install WinDbg Preview

WinDbg Preview is a new version of WinDbg with more modern visuals, faster windows, a full-fledged scripting experience, built with the extensible debugger data model front and center. WinDbg Preview supports debugging every version of Windows 10.

For download links and more information about WinDbg Preview, see Download WinDbg Preview.

Standalone tools for debugging Windows XP and Windows Vista

If you’re debugging Windows XP, Windows Server 2003, Windows Vista, or Windows Server 2008 (or using one of these operating systems to run Debugging Tools for Windows), you need to use the Windows 7 release of the debugging tools. It’s included in the SDK for Windows 7 and .NET Framework 4.0.

Newer versions of the Visual C++ 2010 Redistributable can cause issues when you install the SDK for Windows 7.

Get the standalone debugging tools for Windows XP by first downloading the Windows 7 SDK: Microsoft Windows SDK for Windows 7 and .NET Framework 4.

To install the Debugging Tools for Windows as a standalone component, start the SDK installer, and in the installation wizard, select Debugging Tools for Windows, and clear all other components.

Using Visual Studio or MSBuild to build a driver

This topic describes how you can build a driver using the Visual Studio development environment, or from the command line by using the Microsoft Build Engine (MSBuild).

ImportantВ В Starting in Windows Driver Kit (WDK)В 8, MSBuild replaced the Windows Build Utility (Build.exe). The WDK now uses the same compiler and build tools that you use to build Visual Studio projects. Driver projects that were built with previous versions of the WDK must be converted to work in the Visual Studio environment. You can run a conversion utility from the command line, or you can convert an existing driver by creating new Visual Studio project from existing sources. For more info, see Creating a Driver From Existing Source Files and WDK and the Visual Studio build environment.

Building a Driver Using Visual Studio

You build a driver the same way you build any project or solution in Visual Studio. When you create a new driver project using a Windows driver template, the template defines a default (active) project configuration and a default (active) solution build configuration.

NoteВ В You can convert projects and solutions that you created with WDKВ 8 or Windows Driver Kit (WDK)В 8.1 to work with Windows Driver Kit (WDK)В 10 and Visual StudioВ 2019. Before you open the projects or solutions, run the ProjectUpgradeTool. The ProjectUpgradeTool converts the projects and solutions so that they can be built using WDKВ 10.

For information about managing and editing build configurations, see Building in Visual Studio.

The default Solution build configuration is Debug and Win32.

To select a configuration and build a driver

  1. Ensure that you have the same version of SDK and WDK installed on your computer.
  2. Open the driver project or solution in Visual Studio.
  3. Select and hold (or right-click) the solution in the Solutions Explorer and select Configuration Manager.
  4. From the Configuration Manager, select the Active solution configuration (for example, Debug or Release) and the Active solution platform (for example, Win32) that correspond to the type of build you are interested in.
  5. Select and hold (or right-click) the Avshws project and select Properties. Navigate to Driver Settings > General, and set Target OS Version and Target Platform.
  6. Configure the project properties for your driver or driver package. You can set properties for deployment, driver signing, or other tasks. For more information, see Configuring project properties for your driver and driver package.
  7. From the Build menu, select Build Solution (Ctrl+Shift+B).

Building a Driver Using the Command Line (MSBuild)

You can build a driver from the command line using the Visual Studio Command Prompt window and the Microsoft Build Engine (MSBuild)

To build a driver using the Visual Studio Command Prompt window

Open a Developer Command Prompt for VS2019 window.

From this window you can use MSBuild.exe to build any Visual Studio project by specifying the project (.VcxProj) or solutions (.Sln) file.

Navigate to the project directory and enter the MSbuild command for your target.

For example, to perform a clean build of a Visual Studio driver project called MyDriver.vcxproj using the default Platform and Configuration, navigate to the project directory and enter the following MSBuild command:

Syntax — To specify a specific configuration and platform, use the following command syntax:

For example, the following command builds a driver for the «Debug» configuration, «Win32» platform, and for WindowsВ 10.

The TargetPlatformVersion setting is optional and allows you to specify the kit version to build with. The default is to use the latest kit.

Configuring project properties for your driver and driver package

You use property pages to configure and set options for your driver and driver package. You can choose to configure your driver so that it is automatically signed when you build your solution, or automatically deployed to a remote test computer.

The WDK provides a number of command-line tools, such as Stampinf and WPP Preprocessor (WPP Tracing), that are commonly included in the build process. These tools are not distributed with Visual Studio. To combine these tools with the Visual Studio build environment they are wrapped as WDK tasks for MSBuild. If you use one of the driver templates or have an existing driver that you have converted, these property pages might already exist for your project. If not, the property pages are automatically added to your project as you add the related file types to the project or solution (for example, .mc or .man files for the message compiler). For more information, see WDK and the Visual Studio build environment

You can set properties for an individual driver or for an entire driver package. The following table shows some of the available properties that you can configure specifically for drivers and driver packages.

Signing properties for individual driver files (see Signing a Driver)

Signing properties for driver packages (see Signing a Driver)

Troubleshooting tip for building a driver

The following tip can help you troubleshoot problems when you use the WDK and Visual Studio to build drivers.

To increase the verbosity of the build output using the options in Visual Studio

  1. Select Tools>Options.
  2. Select the Project and Solutions folder and select Build and Run.
  3. Change the options for the MSBuild project build output verbosity and MSBuild project build log file verbosity. By default, these are set to Minimal.
Читайте также:  Увеличение файла подкачки линукс
Оцените статью
Driver Project Properties Driver Package Properties