最近将wdk升级到1703(10.0.15063.0)版本,编译一个新建的minifiter项目居然出现了失败
提示错误为 WindowsDriver.common.targets(460,5): error MSB6004: The specified task executable location "\stampinf.exe" is invalid.
解决如下:
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
Known issues for the WDK:
Unable to build a project targeting a SDK version older than 1709 (version 10.0.16299.0) with WDK 1709 (build 16299)
One of following errors is reported:
C:\Program Files (x86)\Windows
Kits\10\build\WindowsDriver.common.targets(460,5): error MSB6004: The
specified task executable location "\stampinf.exe" is invalid.
C:\Program Files (x86)\Windows
Kits\10\build\WindowsDriver.common.targets(780,5): error MSB6004: The
specified task executable location "\tracewpp.exe" is invalid.
Workaround: Add to your project .vcxproj file the following lines after the first one:
<PropertyGroup>
<WDKBinRoot Condition="'$(WDKBinRoot)' == ''">$(WindowsSdkDir)bin</WDKBinRoot>
<WDKBinRoot_x86>$(WDKBinRoot)\x86</WDKBinRoot_x86>
<WDKBinRoot_x64>$(WDKBinRoot)\x64</WDKBinRoot_x64>
</PropertyGroup>
You can also add these lines to WindowsDriver.Default.props or
WindowsDriver.Shared.props (located under <Windows 10 Kits
installation root>\build, by default “%ProgramFiles(x86)%\Windows
Kits\10\build” or “%ProgramFiles(x86)%\Windows Kits\10\build”)
to allow all projects to build successfully without any modifications.
Unable to build projects under VS2015 after installing WDK 1709 (version 16299) on a machine with WDK 1607 (build 14393)
One of following errors is reported:
C:\Program Files (x86)\Windows
Kits\10\build\WindowsDriver.common.targets(476,9): error MSB4064: The
"ProviderName" parameter is not supported by the "StampInf" task. Verify
the parameter exists on the task, and it is a settable public
instance property.
C:\Program Files (x86)\Windows
Kits\10\build\WindowsDriver.common.targets(1526,9): error MSB4064: The
"KitVersion" parameter is not supported by the "Telemetry" task. Verify
the parameter exists on the task, and it is a settable public
instance property.
Workaround: As WDK has moved to provide compatibility with VS2017, a few file updates required by the VS2015 add-on are not being bundled by the latest version of WDK. WDK 1703 (version 15063) includes these updates, and therefore installing this version will resolve the issue. If your project targets an older version of WDK, you might also require doing the workaround previously provided.
在WindowsDriver.Shared.props增加上述配置,编译解决!