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.1. For information on the latest release of the WDK, SDK and Visual Studio, see Kit versioning.
Users can access and consume the NuGet packages directly from nuget.org from within Visual Studio. Using NuGet with the WDK provides a lightweight solution for WDK acquisition for developers who need always up to date tools for building modern hardware drivers. For more information, see Install and manage packages in Visual Studio using the NuGet Package Manager.
The WDK NuGet packages are also available on the NuGet website.
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.
Install the latest WDK using NuGet - Step by Step
Prerequisites
- X64/ARM64 PC with Windows 11 or newer.
Step 1: Install Visual Studio 2022
Download and install Visual Studio 2022 Community, Professional, or Enterprise edition.
During the installation, select and install Desktop development with C++.
Step 2: Prepare Visual Studio
The WDK requires Visual Studio 2022 with the VS 2022 C++ build tools and their corresponding VS 2022 C++ Spectre-mitigated libs (Latest) components for each architecture you intend to build drivers for.
Register and sign in with your credentials to Visual Studio.
Select and install the following VS individual components - MSVC V143 - VS2022 C++ x64/x86 Spectre-mitigated libs (Latest) and MSVC V143 - VS2022 C++ ARM64 Spectre-mitigated libs (Latest)
Step 3: Install WDK Visual Studio extension
Option 1: Visual Studio Marketplace
In Visual Studio, select Extensions, Manage Extensions and then Visual Studio Marketplace. Search for "Windows Driver Kit", select and install the Windows Drivers Kit Visual Studio extension.
Option 2: Download and install
Download and install the Windows Drivers Kit Visual Studio Extension using this link:
Windows Driver Kit - Visual Studio Marketplace
Getting Started - Use the WDK to develop a driver
Follow the following steps to acquire and install WDK NuGet package in Visual Studio.
Launch Visual Studio.
Create a new driver project, for example a "Kernel Mode Driver (KMDF)" C++ project.
Right Click the driver project solution file, and select Manage NuGet packages.
Click the drop down menu beside the package source and select
nuget.org
.Search for "WDK".
Select
Microsoft.Windows.WDK.x64
orMicrosoft.Windows.WDK.ARM64
based on the platform architecture that you wish to develop for.Leave other checkboxes set at their defaults.
Select Install.
The WDK takes dependencies on the SDK NuGet packages, and it will install the required packages.
Review and accept the license terms to complete the installation.
- 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.
Updating NuGet Packages in existing driver projects
To update NuGet Packages in existing driver projects, follow these steps.
Open the existing driver project in Visual Studio.
Right Click the driver project solution file, and select Manage NuGet packages.
Click on the Updates tab.
Click on the Include prerelease box, if you wish to use prerelease WDK packages.
Select the packages you wish to update in the list.
Select Install.
Select Apply.
- Review and accept the license terms to complete the installation.
See also
Use command-line parameters to install, update, and manage Visual Studio
Related downloads
Download current version of the WDK and Enterprise WDK manually
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor