How to resolve the error: The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found

Viewed 22

I used following pipeline task to build a windows driver project

- task: MSBuild@1
  inputs:
    solution: '$(Build.SourcesDirectory)/Manager/HubFilter/HubFilter.vcxproj'
    msbuildArchitecture: 'x64'
    platform: 'x64'
    configuration: 'Release'

Here is the error:

"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe" "C:\agent\_work\3\s\Manager\HubFilter\HubFilter.vcxproj" /nologo /nr:false /dl:CentralLogger,"C:\agent\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.208.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=|SolutionDir=C:\agent\_work\3\s\Manager\HubFilter|enableOrphanedProjectsLogs=true"*ForwardingLogger,"C:\agent\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.208.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"  /p:platform="x64" /p:configuration="Win7_Release" /p:_MSDeployUserAgent="VSTS_c9d6ee57-7704-47af-9a94-39e083fbb1d9_build_15053_0"
Build started 9/19/2022 10:56:44 AM.
##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(440,5): Error MSB8020: The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found. To build using the WindowsKernelModeDriver10.0 build tools, please install WindowsKernelModeDriver10.0 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Project "C:\agent\_work\3\s\Manager\HubFilter\HubFilter.vcxproj" on node 1 (default targets).
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(440,5): error MSB8020: The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found. To build using the WindowsKernelModeDriver10.0 build tools, please install WindowsKernelModeDriver10.0 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\agent\_work\3\s\Manager\HubFilter\HubFilter.vcxproj]
Done Building Project "C:\agent\_work\3\s\Manager\HubFilter\HubFilter.vcxproj" (default targets) -- FAILED.

Build FAILED.

Then I use following task to install WDK 10.

https://community.chocolatey.org/packages/windowsdriverkit10
https://community.chocolatey.org/packages/windowsdriverkit11

displayName: 'Install the win 10.0 WDK'
  inputs:
  targetType: 'inline'
  script: |
  choco install windowsdriverkit11

The installation was a success but it did not resolve the error. The VS installed in the agent is VS2022, so should I install the latest WDK(10.0.22621.382) for VS2022, or is there any solution for this error? thanks. https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-step-3-install-windows-11-version-22h2-wdk

0 Answers
Related