When I run WHLK test for my driver on OS version Win11 22621, it needs the SDV report. So I click Driver menu → launch static driver verifies, then VS2022 shows a window for me, I use the default config and click “run”, the error message in altert is:
[FATAL ERROR] Unrecoverable error in NormalBuild stage.
C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original>cd /d “C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original” && msbuild “AwinicSKTuneApo_For_Honor.vcxproj” /t:sdv /p:inputs=“/check /devenv” /p:configuration=“Release” /p:platform=“x64” /p:SolutionDir=“C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original”
sdv:
staticdv /check /devenv
SDV: C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV
SMV: C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv
SDVAP: C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv\analysisplugins\sdv
Build environment: msbuild
[INFO] Cleaning …
[INFO] Setting interceptor platform to x64
[INFO] Setting platform to x86_amd64
[INFO] Validating XML against schema: C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv\bin\Config.xsd
[INFO] Running local scheduler with 4 threads
C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(136,9): error MSB3073: command“staticdv /check /devenv” exit, -1.
I run the command “staticdv.exe /check /devenv” in CMD window, it shows the error message:
SDV does not support this build environment.
WDKContentRoot environment variable must not be null or empty.
SDV exit code: 24
So I add the WDKContentRoot environment variable in my system, but it also fails.
My development environment is: visual studio 2022 + WDK 22621 + SDK 22621, how I resolve the issue