網上收集的:(2020年,再開發win7驅動發現好難,各種下載困難,得用老的vs+老的wdk )
問題1:
C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(780,5): error MSB6004: The specified task executable location "\tracewpp.exe" is invalid.
解決方法:
1、在project.vcxproj文件的第一行后面添加以下行:
<PropertyGroup>
<WDKBinRoot Condition="'$(WDKBinRoot)' == ''">$(WindowsSdkDir)bin</WDKBinRoot>
<WDKBinRoot_x86>$(WDKBinRoot)\x86</WDKBinRoot_x86>
<WDKBinRoot_x64>$(WDKBinRoot)\x64</WDKBinRoot_x64>
</PropertyGroup>
也可以將這些行添加到WindowsDriver.Default.props或者WindowsDriver.Shared.props(位於<Windows 10 Kits installation root>\build下,默認情況下為“%ProgramFiles(x86)%\Windows Kits\10\build”或“%ProgramFiles(x86)%\Windows Kits\10\build”),允許所有項目在不進行任何修改的情況下成功生成。
原因是:無法使用WDK 1709(內部版本16299)生成以早於1709(版本10.0.16299.0)的SDK版本為目標的項目。
問題2:
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.
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
原因是:也無法在安裝WDK 1709(版本16299)后的機器上用VS2015下生成WDK 1607(內部版本14393)版本的項目(原話是:Unable to build projects under VS2015 after installing WDK 1709 (version 16299) on a machine with WDK 1607 (build 14393))。
解決方法:由於WDK已經開始提供與VS2017的兼容性,因此最新版本的WDK沒有捆綁VS2015插件所需的一些文件更新。WDK 1703(版本15063)包含這些更新,因此安裝此版本將解決此問題。如果項目的目標是舊版本的WDK,則可能還需要執行之前提供的解決方法。
問題3:
VS2013+WDK8.1編譯時tracewpp.exe無效
在應用&功能上,vs2013,選擇【修復】(repair) .修復完成重啟系統,也許就OK了