1

我是 Windows 驱动程序主题的新手。我正在尝试在 Visual Studio 2015 中构建Windows 驱动程序示例之一。编译和链接步骤顺利通过,然后出现以下错误:

TRACKER : error TRK0002: Failed to execute command:
    ""C:\Program Files (x86)\Windows Kits\10\bin\x86\inf2cat.exe"
        /os:10_x64 /driver:x64\Debug\WFPSamplerCalloutDriver\".
The operation identifier is not valid.

(注意 /driver 参数中的相对路径)。如果我使用驱动程序的完整路径从命令提示符手动调用 Inf2Cat,它将顺利通过:

C:\Program Files (x86)\Windows Kits\10\bin\x86>Inf2Cat.exe /os:10_x64
/driver:C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug\W
FPSamplerCalloutDriver
...........................
Signability test complete.

Errors:
None

Warnings:
None

Catalog generation complete.
C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug
\WFPSamplerCalloutDriver\wfpsamplercalloutdriver.cat

因此,在我看来,VS 以某种方式未能在 Inf2Cat 的参数中提供驱动程序的完整路径。

我怎样才能解决这个问题?我的项目的哪个配置属性不正确?

4

1 回答 1

1

描述

似乎来自 SDK10 的 Inf2Cat 不接受 VS Project Configurator 提供的目录路径格式。适用于:输出文件夹名称没有尾随“\”或文件夹名称以“\.”结尾。

劳苦

  1. 在项目首选项下禁用 Inf2Cat:运行 Inf2Cat ->
  2. 在 Build-Events->Post Build-Event: Command Line ->下配置构建事件"$(WindowsSdkDir)bin\$(DDKPlatform)\inf2cat.exe" /os:10_$(DDKPlatform) /driver:"$(ProjectDir)$(IntDir)$(MSBuildProjectName)"
于 2018-04-08T18:55:32.403 回答