3
votes

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.

2

2 Answers

2
votes

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.

-1
votes

$(LatestTargetPlatformVersion) instead of hard coded TargetPlatform version like 10 or 8.1