Install the WDK using NuGet

This topic describes how to use NuGet to install the Windows Driver Kit on your computer. NuGet is a popular package manager, used for packaging and distributing software. For more information, see What is NuGet?.

Windows Drivers Kit Overview

Windows Driver Kit (WDK) is a software tool set used to develop, test and deploy Windows drivers. The content included in the WDK can be categorized into five unique types: Headers, Libraries, Samples, Tools and Templates.

The WDK is released in three different distributions, with different installation options.

Windows Driver Kit (WDK): The WDK is available as a traditional msi based package. It requires Visual Studio to be installed and the WDK is installed to %ProgramFiles(x86)%\Windows Kits\. See Download the Windows Driver Kit (WDK) for information on downloading and installing the WDK.

Enterprise Windows Drivers Kit (EWDK): This is shipped as a standalone ISO, which includes the command line compiler build tools, the SDK and the WDK. The EWDK is a standalone self-contained command-line environment. To get started, just mount the ISO and run LaunchBuildEnv. Visit Download the Windows Driver Kit (WDK) for details on how to download and use the EWDK.

Windows Drivers Kit NuGet Package: The WDK NuGet package consists of essential libraries, headers, DLL, tools and metadata used for building Windows drivers that can be shared and supported by modern CI/CD pipelines. The official release of the WDK NuGet package is now available on nuget.org. The latest release version is 10.0.26100.1882. For information on the latest release of the WDK, SDK and Visual Studio, see Kit versioning.

Developers can access and integrate Windows Driver Kit (WDK) NuGet packages directly from Visual Studio via the NuGet Package Manager. By utilizing these packages, driver developers can seamlessly install essential build tools into their projects, facilitating a streamlined and efficient process for acquiring WDK. Moreover, the use of WDK NuGet packages allows for more frequent updates and releases, and they can be easily integrated into build systems within CI/CD pipelines. For more information, see Install and manage packages in Visual Studio using the NuGet Package Manager.

Here are the links to the x64 and ARM64 WDK NuGet packages available on nuget.org.

x64: https://www.nuget.org/packages/Microsoft.Windows.WDK.x64/

ARM64: https://www.nuget.org/packages/Microsoft.Windows.WDK.ARM64

Directions for building drivers in automated build systems

For directions on building drivers in large automated system, see Building Locally.

Getting Started with WDK NuGet

Prerequisites

  • X64/ARM64 PC with Windows 11 or newer.

Install Visual Studio 2022

The WDK NuGet requires Visual Studio. Download and install Visual Studio 2022 Community, Professional, or Enterprise edition.

Download Visual Studio Tools

When you install Visual Studio 2022, select the Desktop development with C++ workload, then under Individual Components add:

  • MSVC v143 - VS 2022 C++ ARM64/ARM64EC Spectre-mitigated libs (Latest)

  • MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)

  • C++ ATL for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC)

  • C++ ATL for latest v143 build tools with Spectre Mitigations (x86 & x64)

  • C++ MFC for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC)

  • C++ MFC for latest v143 build tools with Spectre Mitigations (x86 & x64)

  • Windows Driver Kit

How to Install WDK NuGet

Follow the following steps to acquire and install WDK NuGet package in Visual Studio.

  1. Launch Visual Studio.

  2. Create a new driver project, for example a "Kernel Mode Driver (KMDF)" C++ project.

  3. Right Click the driver project solution file, and select Manage NuGet packages.

  4. Click the drop down menu beside the package source and select nuget.org.

  5. Search for "WDK".

  6. Select Microsoft.Windows.WDK.x64 or Microsoft.Windows.WDK.ARM64 based on the platform architecture that you wish to develop for.

  7. Leave other checkboxes set at their defaults.

  8. Select Install.

screenshot of Visual Studio NuGet packages being installation dialog

Note

The SDK NuGet package will automatically be installed as part of WDK NuGet installation.

  1. Review and accept the license terms to complete the installation.

screenshot of Visual Studio showing a list of three NuGet packages with links to license terms

  1. Build and test your WDK driver solution.

Note

Use of the dotnet command line doesn't work with WDK, and its use is not recommended.

How to Update WDK NuGet

To update NuGet Packages in existing driver projects, follow these steps.

  1. Open the existing driver project in Visual Studio.

  2. Right Click the driver project solution file, and select Manage NuGet packages.

  3. Click on the Updates tab.

  4. Click on the Include prerelease box, if you wish to use prerelease WDK packages.

  5. Select the packages you wish to update in the list.

screenshot of Visual Studio NuGet packages update with WDK and WDK packages

  1. Select Install.

  2. Select Apply.

screenshot of Visual Studio NuGet packages update apply dialog

Review and accept the license terms to complete the installation.

See also

What is NuGet?

Use command-line parameters to install, update, and manage Visual Studio

Download Visual Studio Tools

Download current version of the WDK and Enterprise WDK manually

Download previous versions of the WDK manually

Download the Windows Debugging Tools (WinDbg)