2013-09-26 60 views
2

我想在Windows 8下使用WDK 8.1和Visual Studio 2012构建一个项目。我没有安装Visual Studio 2013 Preview,但根据需求页面我已满足所有要求:WDK 8.1与Visual Studio 2012失败

WDK 8.1 Requirements

该网页说:

System Requirements Before you install the WDK, you must first install Microsoft Visual Studio Professional 2012 or above.

我的项目是使用WDK 8.0,所以我跟着这里提供迁移到WDK 8.1指令创建:

ProjectUpgradeTool: Upgrade a WDK 8 project or solution to WDK 8.1

当运行命令:

ProjectUpgradeTool.exe C:\Sources\MyDriver 

我得到了以下错误:

Catastrophic failure while converting projects under 'C:\Sources\MyDriver': Message:Could not load file or assembly 'Microsoft.Build, Version=12.0.0.0 , Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependenc ies. The system cannot find the file specified. StackTrace= at Microsoft.DriverKit.ProjectUpgradeTool.ProjectUpgrader.UpgradeProjec
ts(IEnumerable 1 projectFiles) at Microsoft.DriverKit.ProjectUpgradeTool.Upgrader.UpgradeProjects(IEnu
merable
1 files, String newOsConfigName)

有没有人对如何解决这个错误提示吗?因为我张贴了这个问题

更新为2014年1月12日的文件中

已被修改,现在明确规定,VS2013确实需要WDK8.1发展。

MSDN forums

回答

1

在上page that you have linked to系统要求的第一项明确规定的Visual Studio 2013是需要使用WDK 8.1:

Before you install WDK 8.1, you must first install Visual Studio 2013.

您需要使用WDK 8与Visual Studio 2012,以保持,虽然它的not officially supported any more

We provide Windows Driver Kit (WDK) 8 to give you time to migrate to WDK 8.1 and Visual Studio 2013. Microsoft does not support WDK 8 and will make no further updates to WDK 8. We recommend that you use the latest versions of the WDK and Visual Studio to build drivers for Windows. Download the Windows Driver Kit (WDK) 8, which has tools to build, test, debug, and deploy drivers.

+0

自发布该问题以来页面已更改,但谢谢 – yms

3

如果你想在Visual Studio 2012中使用WDK,你应该得到8.1版本,但不是8.0的WDK。

+0

如果我使用Visual Studio 2015,该怎么办? Namke2MSbuild给出相同的错误。 – Stubborn

0

如果您安装了WDK 8.0和8.1,则使用%WDKContentRoot%env var指定活动的WDK。您的vcxproj可能会通过此变量引用WDK,因此可能需要更改它。