I am trying to build a project using WDK 8.1 and Visual Studio 2012 under Windows 8. I do not have Visual Studio 2013 Preview installed, however according to the requirements page I have fulfilled all the requirements:

WDK 8.1 Requirements

That page says:

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

My project was created using WDK 8.0 so I followed the instructions provided here for migrating to WDK 8.1:

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

While running the command:

ProjectUpgradeTool.exe C:\Sources\MyDriver

I got the following error:

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(IEnumerable1 projectFiles) at Microsoft.DriverKit.ProjectUpgradeTool.Upgrader.UpgradeProjects(IEnu
merable
1 files, String newOsConfigName)

Does anyone have a hint on how to get around this error?

Update as of Jan 12 2014

The documentation has been modified since I posted this question, and it clearly states now that VS2013 is indeed required for WDK8.1 development.

Same question in MSDN forums

有帮助吗?

解决方案 2

The first item in the system requirements on the page that you have linked to clearly states that Visual Studio 2013 is required to use WDK 8.1:

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

You will need to keep using WDK 8 with Visual Studio 2012, although it's 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.

其他提示

If you want to use WDK with Visual Studio 2012, you should get not 8.1 version but 8.0 of WDK.

You need Visual Studio 2013 to develop for Windows 8.1 I believe.

If you have both WDK 8.0 and 8.1 installed, the active one is specified using %WDKContentRoot% env var. Your vcxproj likely references the WDK by this variable so may have to change it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top