WindowsSdkDir 未在 Visual Studio 2010 中正确设置 [英] WindowsSdkDir is not set correctly in Visual Studio 2010

查看:38
本文介绍了WindowsSdkDir 未在 Visual Studio 2010 中正确设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我已经搜索了很长一段时间,但无济于事!有没有人想出如何在 Visual Studio 2010 中更改 $(WindowsSdkDir) 宏,使其指向他们想要的任何版本的 Windows sdk?

So i've been searching this for quite a while now, to no avail! Has anyone figured out how to change the $(WindowsSdkDir) macro in visual studio 2010, to make it point to whatever version of the windows sdk they would like?

希望这可以作为所有在我之后搜索此内容的人的参考.:)

Hopefully this can be a reference to all those who will search for this after me. :)

推荐答案

我在尝试使用 VS2010 和 Windows 7/.NET 4 SDK (v7.1) 设置新系统时遇到了类似的问题.结果证明该解决方案类似于 Visual Studio 2008,但在不同的注册表位置.您想应用相同的编辑,但位置是

I ran into a similar problem when trying to setup a fresh system using VS2010 and the Windows 7 / .NET 4 SDK (v7.1). The solution turns out to be similar to the one for Visual Studio 2008, but in a different registry location. You want to apply the same edits, but the location is

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows

对于 32b Windows 和

for 32b Windows and

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows

适用于 64b Windows.

此外,根据您的安装(对于 32b 和 64b 版本的 Windows),您可能还需要更改 HKEY_CURRENT_USER 树中的相应键.

Also, depending on your installation (for both 32b and 64b versions of Windows), you may also need to change the corresponding key in the HKEY_CURRENT_USER tree.

您要编辑以下键以指向要使用的 SDK 版本:

You want to edit the following keys to point to the SDK version you want to use:

CurrentInstallFolder
CurrentVersion
ProductVersion

进行更改后,我重新启动了 Visual Studio 并使用了相应的 SDK 版本.我不知道这是否是 SDK 安装程序中的错误(为 WindowsSDK v6.1,但对于 v7.1 没有)或者如果它是设计使然,但是在我进行更改后,一切似乎都可以正确编译.

After making the changes, I restarted Visual Studio and it used the appropriate SDK version. I don't know if this is a bug in the SDK installer (one was logged for the WindowsSDK v6.1, but none for v7.1) or if it is by design, but everything seems to compile correctly after my changes.

针对 32b 和 64b Windows 7 进行测试.

Tested for 32b and 64b Windows 7.

这篇关于WindowsSdkDir 未在 Visual Studio 2010 中正确设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆