2013-09-26 106 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,因此可能需要更改它。

相關問題