visual-studio-2013 - 是否可以将 Windows 10 WDK 与 Visual Studio 2013 集成?

标签 visual-studio-2013 msbuild windows-10 wdk

我需要处理 Windows 10 特定驱动程序类型。获取并安装 WDK 10.0.10075 没有问题。我在安装 WDK 之前安装了 Visual Studio 2013 Pro。

现在如何将 WDK 集成到 Visual Studio 中?我知道 Visual Studio 2015 RC 可用,但我现在更喜欢使用 Visual Studio 2013 IDE 和 Windows driver samples 包含 Visual Studio 2013 解决方案

但是,当我打开解决方案并尝试构建它时,我得到:

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found. To build using the WindowsKernelModeDriver10.0 build tools, please install WindowsKernelModeDriver10.0 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

全文作为引用,更方便阅读:

error MSB8020: The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found. To build using the WindowsKernelModeDriver10.0 build tools, please install WindowsKernelModeDriver10.0 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".

不出所料,我在解决方案的上下文菜单中没有看到“升级解决方案...”选项,并且在主菜单的“项目”子菜单中也没有看到它。

有没有办法让 MSBuild 识别 Windows 10 WDK 工具集,以便 Visual Studio 2013 可以处理它?<​​/p> <小时/>

因此 Windows 10 WDK 在 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140 中注册自身(与 VS 2013 的 v120 不同,我猜有人迷信 VS 2015 使用内部版本号 13.x?)。

我首先尝试的是备份 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v120分别。

然后,我合并了 v140 下的文件和文件夹。进入v120 。顺便说一句,在此过程中没有文件被覆盖。

尝试使用它再次构建,我收到另一个错误:

1>C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(178,5): error : An SDK corresponding to WDK version '' was not found. Please install the SDK before building.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

作为 block 引用:

error : An SDK corresponding to WDK version '' was not found. Please install the SDK before building.

前景广阔。我确实还没有安装相应的SDK。所以我就这么做了(Windows 10 SDK 10.0.10069)。不幸的是,安装该 SDK 后错误消息保持不变。

最佳答案

在线示例应该适用于 VS 2015 RC。许多示例甚至已转换为通用驱动程序示例。

对于内核模式驱动程序,应该可以通过移动各种 MSBuild 文件并编辑其中一些文件来实现,这与您尝试执行的操作类似。请注意,这并未以任何方式得到官方支持。对于用户模式驱动程序,它不太可能起作用。 Windows 10 WDK 依赖于匹配的 SDK 版本,并且由于为支持通用应用和驱动程序开发而进行的所有更改,该 SDK 与 VS 2015 紧密耦合。

在 MSBuild 工具集中,还有一堆假定已定义的属性,其中一些属性只有在使用 VS 2015 时才会定义。

请注意,您的 SDK 和 WDK 版本必须匹配。 SDK 10.0.10069 与 WDK 版本 10.0.10075 不匹配。

关于visual-studio-2013 - 是否可以将 Windows 10 WDK 与 Visual Studio 2013 集成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31479913/

相关文章:

less - 带有 VS2013 预览版的 Dotless HttpHandler

unit-testing - 单元测试项目不能引用MVC项目

visual-studio - Nuget 在构建期间更新包,即使配置为不更新包

c++ - 如何修复 istringstream 编译器错误?

visual-studio-2010 - 逐步如何在Visual Studio 2010中为给定类型的每个文件添加自定义生成步骤?

visual-studio - TypeScript 仅发出一次样板代码

intellij-idea - IntelliJ JavaDoc - 错误 - 无法读取输入长度 = 1

c# - 使用基本身份验证的 HTTP 请求始终返回 401

c# - BackgroundTask UWP Windows 10 TimeTriggeredTask 示例已注册但从未启动

c# - MSBuild示例。需要了解一些信息