WDK 2022 with VS 2022 Build Tools?

Hi,

something similar has been asked before, but answers seem not to fit.

We have a company build server with “VS2022 Build Tools” in use.
The admin likes to keep the machine “clean”, so I was asked to not install EWDK, but use the existing “Build Tools”, saving 10+ GBs .

Now I installed the SDK and WDK like in https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
but can not compile drivers (German messages, but file names are clear:)

"c:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild.exe" /filelogger /t:clean /t:build PCAN_USB.vcxproj /p:Configuration=Debug /p:Platform=x64

C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(314,5): error MSB4062: Die ValidateNTTargetVe
rsion-Aufgabe konnte nicht aus der C:\Program Files (x86)\Windows Kits\10\build\\bin\Microsoft.DriverKit.Build.Tasks.17
.0.dll-Assembly geladen werden. Die Datei oder Assembly "file:///C:\Program Files (x86)\Windows Kits\10\build\bin\Micro
soft.DriverKit.Build.Tasks.17.0.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene
Datei nicht finden. Stellen Sie sicher, dass die <UsingTask>-Deklaration korrekt ist, die Assembly und alle zugehörigen
 Abhängigkeiten verfügbar sind und die Aufgabe eine öffentliche Klasse enthält, die Microsoft.Build.Framework.ITask imp
lementiert. [d:\PEAKCAN\4.x_cpp\Source\Source_Build\PCAN_USB\PCAN_USB.vcxproj]

I also tried to install WDK with “VS 2022 Extensions”, but this refused to run for the “Build Tools”.

A similar call to msbuild.exe works when I add SDKs and WDK to a “VS 2022 Professional” installation.

Question: Can I make WDK compile with non-EWDK Build tools ?

kind regards,
Joerg Hoppe, PEAK System Technik GmbH

The EWDK is a complete set of build tools, it includes the WDK and SDK components. You do not need to install anything else. (In fact you do not ‘install’ the EWDK, you just mount it on or copy it to the build system.)

You can of course also install VS2022 and the correct WDK/SDK add-ons on the same system, but there is no need to do that on a system that is only used for builds.

Hi,
I know about the EWDK. To clarify: I see (theoretically) three ways to build WDK drivers:

  1. via EWDK
  2. via VS2022 + SDK + WDK installation
  3. via “VS2022 Build Tools” + SDK + WDK installation
  1. is working, 2) is working, 3) is what I want to achieve, but fail.

My guess is that the WDK and SDK are not compatible with (3). The only ways I know that work are EWDK or full VS install with WDK+SDK.

2 Likes

Thanks. With your response it was clear we need EWDK2022 on our build server.