About SDV Verifier Questions

TiannaCC 1 Reputation point
2021-07-07T08:29:29.657+00:00

According to MS document, SDV can only support full verifier for KMDF.
And sdv should be able to run successfully on UMDF projects with limited verifier.
So I tried to run sdv on two projects, but for both projects face some problems:

  1. UMDF:
    I got a error message: "There was an error building the driver. Please ensure that the driver can be built correctly and try again."
    I am confirmed my project could be build successfully. And I found the error on log shows: error MSB6006: "link.exe" exited with code -1
  2. KMDF:
    There are two environment:
    A. Win10, vs2017, WDK: 10.0.17740.1000, SDK: 10.0.19041.0, with Visual C++ 2012/2013/2015-2019 Redistributable
    B. Win10, vs2019, WDK: 10.0.21381.1000, SDK: 10.0.18362.0, with Visual C++ 2012/2013/2015-2019 Redistributable
    But only option A could run SDV successfully.
    Option B shows error message: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(687,5): error MSB6006: "CL.exe" exited with code 2。
    and also shows in log: C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(136,9): error MSB3073: "staticdv /check /devenv" command exited with code -1。

Is there any idea could help me to run sdv for both projects?

Thanks,
Tina

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,786 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,539 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Armando VISCONTI 6 Reputation points
    2021-07-12T09:48:57.447+00:00

    I'm having same issue (https://learn.microsoft.com/answers/questions/469484/vs2019-is-it-possible-to-create-a-driver-verificat.html). Can you tell me where the documentation says that SDV can be run only for KMDF?

    So, in case of UMDF, how can the HLK Static Tolls Logo Test can be run?

    EDIT:
    I'm able to create SDV for KMDF project with VS-2019. If I remember well I had same issue on staticdv, but I forgot how I solved it... I'll try to recap.

    EDIT 2:
    No, the staticdv error in SDV is for UMDF. For KMDF it works straight away.
    I'm using:

    VS 2019 - WDK 10.0.21381.1000

    0 comments No comments

  2. TiannaCC 1 Reputation point
    2021-07-14T01:43:22.17+00:00

    Thanks for your reply.

    https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/supported-drivers

    You can refer to basic Driver Characteristics mentioned in this page.
    It seems sdv could also run UMDF, but with limited verifier.

    0 comments No comments

  3. Sun Wane 41 Reputation points
    2023-12-14T12:19:55.4133333+00:00

    I'm having same issue, I try two environment:

    A. vs2022 + WDK 22621 + SDK 22621;

    B. vs2019 + WDK 19041 + SDK 19041

    The same issue 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"  
    用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
    版权所有(C) Microsoft Corporation。保留所有权利。
    生成启动时间为 2023/12/14 16:30:30。
    项目“C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original\AwinicSKTuneApo_For_Honor.vcxproj”在节点 1 上(sdv 个目标)。
    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: 命令“staticdv /check /devenv”已退出,代码为 -1。 [C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original\AwinicSKTuneApo_For_Honor.vcxproj]
    已完成生成项目“C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original\AwinicSKTuneApo_For_Honor.vcxproj”(sdv 个目标)的操作 - 失败。
    生成失败。
    “C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original\AwinicSKTuneApo_For_Honor.vcxproj”(sdv 目标) (1) ->
    (sdv 目标) -> 
      C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(136,9): error MSB3073: 命令“staticdv /check /devenv”已退出,代码为 -1。 [C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original\AwinicSKTuneApo_For_Honor.vcxproj]
        0 个警告
        1 个错误
    已用时间 00:00:28.13
    C:\Users\SUN\Desktop\Honor_APO\AwinicSKTuneApo_Original>exit 0  
    I run the command in CMD: staticdv /check /devenv, and it shows the message:
    SDV does not support this build environment.
    WDKContentRoot environment variable must not be null or empty.
    SDV exit code: 24
    I add WDKContentRoot environment variable in my system manually, but it also failed.
    
    0 comments No comments