visual studio 2010 之二 修改WindowsSdkDir宏

problem:  the $(WindowsSdkDir) macro in VS2010 remains V7.0a

现在是当你安装了sdk7.1时,而 windowssdkdir宏依然是v7.0a,怎么办呢? 当然将新的目录包含进去不久好了吗?

这样当然可以,但是项目往往是集体在做,大家的安装目录不一定在同一个地方,潜在的会造成一定的问题。

如下就是一个更好的解决办法(针对您安装windowssdk 7.1版本哦,否则就不用看了, 当然,它还适用于visual studio2008哦)

 

如下是引用,可以直接看1,2,3,4,5,6步骤的。

If you have a version of Visual Studio 2010 installed (including Express version that I use) with Windows 7.1 SDK, you can actually set in the Solution Explorer of one of your opened solution which platform toolset you want to use. Once you've selected "Windows SDK 7.1", the macro $(WindowsSdkDir) will be updated.

For more information, read the "Samples Reference" of Windows SDK (you should see the shortcut in Programs> Microsoft Windows SDK 7.1) which contains a paragraph about : How To: Using the Platform Toolset With Visual Studio 2010 :

" Visual Studio 2010 users can make use of the new Native Multitargeting functionality of the Platform Toolset to target the Windows SDK v7.1 components. 

1.     Start Visual Studio 2010

2.     In the Visual Studio IDE, open a solution file (*.sln)

3.     In Solution Explorer, right click the solution file and select Properties

4.    Select Configuration Properties, General from the list in the left pane

5.     Select All Configurations in the Configuration dropdown

6.     Select Windows7.1SDK in the Platform Toolset option in the right pane under the General category.

7.     Click the Ok button "

The Windows SDK Configuration Tool shipped with the SDK is apparently designed to work for Visual Studio 2005 or 2008, not 2010.

你可能感兴趣的:(windows,properties,File,express,reference,2010)