是否可以将Windows 10 WDK与Visual Studio 2013集成在一起?

编程入门 行业动态 更新时间:2024-10-28 14:30:45
本文介绍了是否可以将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和 Windows驱动程序示例 包含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 ==========

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

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

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

有没有办法让MSBuild知道Windows 10 WDK工具集,以便Visual Studio 2013可以处理它?

因此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\v140和C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v120.

然后将文件和文件夹从v140下合并到v120中.顺便说一下,在此过程中没有文件被覆盖.

尝试再次使用它进行构建时,出现另一个错误:

1>C:\Program Files (x86)\Windows Kits\10\build\WindowsDrivermon.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\WindowsDrivermon.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集成在一起?

本文发布于:2023-11-28 17:24:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643294.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:WDK   Windows   Studio   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!