简体   繁体   中英

How do you set the Windows SDK target version in VS2010?

I recently installed the Windows 8 SDK version (8.0 & 8.0A) along with the VS2011 Beta. This has had the effect of making all my VS2010 projects attempt to build against Windows SDK version 8.0 instead of 7.1A (which they're supposed to build against). I'm trying to figure out how to set which SDK should be used as the target version. I've found this page:

http://msdn.microsoft.com/en-us/library/ff660764.aspx

Which states:

To use the Windows SDK tools in Visual Studio 2010

  • In Visual Studio 2010, open a solution (.sln) file or create a solution.
  • In Solution Explorer, right-click the solution node and then click Properties.
  • In the Configuration list, select All Configurations.
  • Under Configuration Properties, select General.
  • As the Platform Toolset option, select Windows7.1SDK.
  • Click OK.

However there is no "General" option under configuration properties.... Does anyone know how to do this?

The documentation you found is slightly wrong: it's available in the project properties, not the solution properties:

平台工具集

Building against the 8.0 SDK should not be a problem if you appropriately define WINVER and _WIN32_WINNT before including windows.h . Did you try this?

I usually define solution wide the following predefined macros for Windows XP SP3:

WINVER=0x0501
_WIN32_WINNT=0x0501
NTDDI_VERSION=0x05010300

Similarly you could define your own Windows version: more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM