sticky
Hardware development kits for Windows 10, Version 1903 RRS feed

  • General discussion

  • Install the latest hardware development tools to build, test and deploy drivers; test and measure your hardware running Windows; and customize, assess, and deploy Windows 10 on your hardware.

    WDK: https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit  
    WinDbg: https://developer.microsoft.com/en-us/windows/hardware/download-windbg 
    HLK: https://developer.microsoft.com/en-us/windows/hardware/windows-hardware-lab-kit
    ADK: https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit

    Changes and known issues for the WDK

    WDK supports Visual Studio 2019

    The Windows Driver Kit (WDK) for Windows 10, version 1903, has been updated to support Visual Studio 2019 as previously announced. This release of the WDK is not compatible with Visual Studio 2017 however, developers can continue working with Visual Studio 2017 using the previous releases of the WDK here. To learn about what is new with Visual Studio 2019 please review the information here.

    Driver Menu and Driver Template location changedPlease visit the page ‘What's new in driver development for WDK’ to see the new location of the WDK menus in Visual Studio 2019. 

    EWDK and SDV running on Server have .NET requirements
    Running the EWDK and Static Driver Verifier tool on Windows Server 2018 requires .Net Framework 4.7.2 to be installed on the machine

    Driver Verifier does not get enabled/disabled when using WDK test explorer
    Driver Verifier does not get enabled/disabled when Device Fundamental tests are run using the WDK Test Explorer.

    Workaround:
    On the client machine manually enable/disable driver verifier per these instructions

    Driver Verifier (DV) may return an error when /volatile flag is used on Windows 10, version 1903
    In Windows 10 version 1903 performance improvements were made that indirect calls in driver’s Import Address Table (IAT) were converted direct calls when Import Optimization (IO) is enabled. If DV is enabled at boot, then IO auto-disables itself by detecting DV is on. This causes a perf degradation since IO is turned off. If IO is enabled at boot, then attempting application of DV volatile setting fails by detecting IO is on. The failure message will state: “Failed to start the verification for ‘<driver name here>’ driver. The request is not supported.”

    In general DV should not change behavior of the OS and in future release the focus will be to run IO and DV together with no perf degradation.

    WDK Side by Side installations of Windows 10, version 1903 and Windows 10, version 1803
    With both versions of kits installed on the same PC the ‘Deploy driver’ feature won’t work for older version.

    Work around:
    Use 1803 on a separate machine if Deploy driver  feature is needed.

    Windows Device Testing Framework (WDTF) tests now only run on systems with matching Windows 10 versions as the WDK
    In WDK for Windows 10, version 1809, changes were made to WDTF in order to support this version of Windows 10, version 1809. The effect of this is that WDTF will no longer run on down-level OS. The change continues with WDK for Windows 10, version 1903.
     
    Alterative for down-level testing:
    The WDTF tests in WDK for Windows 10, version 1803 can be run on previous Windows versions

    APIValidator
    On an x86 arch machine APIValidator is unable to run against x64 binaries. If building x64 drivers on an x86 machine APIValidator should be turned off.
     
    Workaround:
    1. Go to the properties page of the driver solution
    2. Select APIValidator, then General and change Run ApiValidator from Yes to No

    WDK running on Windows 7 systems requires KB 3033929
    WDK will require installing Microsoft Security Advisory 3033929 (KB3033929) prior to installing the WDK on systems running Windows 7.  KB3033929 can be downloaded here

    WDK Enables Spectre mitigation by default

    When the WDK is installed, Spectre mitigation is enabled by default for all drivers, this by design. If the Spectre mitigation libraries are not installed, then at build time this message will be seen:

    "Warning MSB8038 Spectre mitigations is enabled but Spectre mitigated libraries are not found. Verify that the Visual Studio Workload includes the Spectre mitigated libraries. See https://aka.ms/0fhn4c for more information." 

    Resolution: 

    For each architecture you intend to build drivers for, install the Spectre mitigated libraries thru Individual Components -> Compilers, build tools, and runtimes -> MSVC v142 - VS 2019 C+ x64/x86 Spectre-mitigated libs (v14.21).

    Once WDK is installed all C++ projects require Spectre mitigations to be installed

    WDK enables Spectre mitigations by default for all drivers, this is by design. There is a known issue where once WDK is installed all C++ projects, regardless if the project is a driver project or not, at build time this message will be seen:

    "Warning MSB8038 Spectre mitigations is enabled but Spectre mitigated libraries are not found. Verify that the Visual Studio Workload includes the Spectre mitigated libraries. See https://aka.ms/0fhn4c for more information." 

    Workaround:

    Either install the Spectre mitigated libraries thru Individual Components -> Compilers, build tools, and runtimes -> MSVC v142 - VS 2019 C+ x64/x86 Spectre-mitigated libs (v14.21).

    Or disable Spectre mitigation by going into “In Projects > Properties > C/C++ Code Generations” set Spectre mitigation to Disabled.

    Error seen when Provisioning a computer for driver deployment and testing when using WDK 1903 and Visual Studio 16.1 +

    The Visual Studio team addressed a reported issue that resulted in the MSVC debug tool location changing. WDK has a dependency on this folder structure and with the Visual Studio fix the folder structure that WDK is looking for is no longer present. When provisioning a computer for driver deployment and testing on a system which has WDK and Visual Studio 16.1 +, provisioning fails. When reviewing the logs, the following error message is present:
    An error occurred while deploying files to the target machine for test "Driver Removal": Could not find a part of the path 'C:\VS\VC\Redist\MSVC\14.21.27702\debug_nonredist\X64\Microsoft.VC141.DebugCRT'..​

    Workaround:

    As Administrator, run Developer Command Prompt for VS 2019
    Run the following commands in the VS Developer Command Prompt:

    1. cd /d %VCToolsRedistDir%\debug_nonredist
    2. MKLINK /J x86\Microsoft.VC141.DebugCRT x86\Microsoft.VC142.DebugCRT
    3. MKLINK /J x64\Microsoft.VC141.DebugCRT x64\Microsoft.VC142.DebugCRT

    Installing the WDK generates an error from Visual Studio that the add-in componet is already installed

    This error message can be seen if the WDK was uninstalled but the WDK drivers extension for Visual Studio was not uninstalled.

    Resolution:

    In Visual Studio go to the Extension dropdown menu, choose Manage Extensions, select the Windows Driver Kit and click on the Uninstall button. 

    Thursday, April 18, 2019 9:44 PM
    Moderator