是否可以将Windows 10 WDK与Visual Studio 2013集成在一起? [英] Is it possible to integrate the Windows 10 WDK with Visual Studio 2013?

查看:1324
本文介绍了是否可以将Windows 10 WDK与Visual Studio 2013集成在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Windows 10特定的驱动程序类型.获取和安装WDK 10.0.10075没问题.在安装WDK之前,我已经安装了Visual Studio 2013 Pro.

我现在如何将WDK集成到Visual Studio中?我知道可以使用Visual Studio 2015 RC,但是我现在更喜欢使用Visual Studio 2013 IDE和

全文作为引文,以方便阅读:

错误MSB8020: WindowsKernelModeDriver10.0的生成工具 (平台工具集='WindowsKernelModeDriver10.0')找不到.到 请使用WindowsKernelModeDriver10.0构建工具进行构建 安装WindowsKernelModeDriver10.0生成工具.或者,你 可以通过选择 项目菜单或右键单击解决方案,然后选择升级 解决方案...".

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

有没有办法让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 ==========

作为大楷报价:

错误:找不到与WDK版本"相对应的SDK.在构建之前,请先安装SDK.

很有希望.我确实还没有安装相应的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不匹配.

I need to work on a Windows 10 specific driver type. Getting and installing the WDK 10.0.10075 is no problem. I had Visual Studio 2013 Pro installed prior to installing the WDK.

How can I now integrate the WDK into Visual Studio? I know the Visual Studio 2015 RC is available, but I'd prefer to use the Visual Studio 2013 IDE for now and the Windows driver samples contain Visual Studio 2013 solutions.

However, when I open the solution and attempt to build it, I get:

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 ==========

Full text as a quote for more convenient reading:

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...".

Unsurprisingly I don't get "Upgrade Solution..." as an option in the context menu of the solution and I don't see it in the "Project" submenu of the main menu either.

Is there a way to make the Windows 10 WDK tool set known to MSBuild such that Visual Studio 2013 can handle it?


So the Windows 10 WDK registers itself inside C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140 (as opposed to v120 for the VS 2013 stuff, I guess someone was superstitious about using internal version number 13.x for VS 2015?).

What I tried first was to take a backup of C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140 and C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v120 respectively.

I then merged the files and folders from under v140 into v120. No files were overwritten in the process, by the way.

Trying to build once again using this, I got another error:

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 ==========

As a block quote:

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

Promising. I had indeed not installed the respective SDK just yet. So I went and did that (Windows 10 SDK 10.0.10069). Unfortunately the error message stays the same after installation of that SDK.

解决方案

The online samples should be for VS 2015 RC. A lot of the samples have even been converted to be universal driver samples.

For kernel mode drivers, it should be possible by moving various MSBuild files and editing some of them, which is similar to what you tried to do. Note that this is not officially supported in any way. For user mode drivers, it is very unlikely that it will work. The Windows 10 WDK has a dependency on the matching SDK version, and because of all the changes that were made to support universal apps and drivers development, the SDK is tightly coupled with VS 2015.

In the MSBuild toolset, there are also a bunch of properties that are assumed to be defined, and some of those will only be defined if you are using VS 2015.

Note that your SDK and WDK versions must match. SDK 10.0.10069 does not match WDK version 10.0.10075.

这篇关于是否可以将Windows 10 WDK与Visual Studio 2013集成在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆