You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Driver build fails with C1083 (ntddk.h not found) because WDKContentRoot defaults to C:\Program Files in 64-bit MSBuild #1430
I ran into an issue where newly created driver projects (WindowsKernelModeDriver10.0) failed to build out of the box with fatal error C1083: Cannot open include file: 'ntddk.h': No such file or directory.
Along with the build error, the Driver Settings and Linker tabs were completely missing from the project property pages, and MSBuild was compiling main.c with user-mode flags (/MDd, /EHsc, /RTC1) instead of driver flags.
After digging into diagnostic MSBuild logs, I noticed that $(WDKContentRoot) was resolving to C:\Program Files\Windows Kits\10\ instead of C:\Program Files (x86)\....
What's happening
On my machine (Windows 11, VS 2026 x64, WDK 10.0.28000), the WDK installer didn't populate the WDKContentRoot string under HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots. KitsRoot10 and WdkBinRootVersioned were there, but WDKContentRoot was missing.
In WindowsKernelModeDriver10.0\Toolset.props, there's a fallback if that registry key isn't found:
The Exists(...) check looks in C:\Program Files\..., fails silently, and skips importing the target file entirely. It doesn't warn or error out—it just treats the project like a regular console app and never sets up the kernel include paths.
Workaround
Setting WDKContentRoot as a system environment variable fixed the problem immediately:
Activity