切换 VS2010 以使用 Windows 7.1 SDK [英] Switching VS2010 to use Windows 7.1 SDK

查看:37
本文介绍了切换 VS2010 以使用 Windows 7.1 SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的开发机器上使用 VS2008 多年了,使用 Windows SDK v7.1.

I've used VS2008 on my development machine for some years now, with windows SDK v7.1.

我已经安装了 VS2010,它使用的是 Windows SDK v7.0a,但我需要它来使用 Windows 7.1 SDK(我在安装 VS2010 之前已经安装).

I've installed VS2010, and it's using the Windows SDK v7.0a, but I need it to use the Windows 7.1 SDK (which I had installed prior to installing VS2010).

当我运行 Windows SDK 7.1 配置工具时,为了切换正在使用的 Windows SDK,该工具会针对 VS2008 进行更新,但不会针对 VS2010 进行更新.它报告的消息是:

When I run the Windows SDK 7.1 configuration tool, to switch the Windows SDK in use, the tool updates for VS2008, but not for VS2010. The message it reports is:

"The Windows SDK Configuration Tool has successfully set Windows SDK version v7.1 as the current version for Visual Studio 2008"

配置工具随 Windows 7.1 SDK 一起安装,可在此处找到:

The configuration tool is installed with the Windows 7.1 SDK and is found here:

"C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe"

VS2010 继续使用 WSDK 7.0a,这非常令人沮丧,因为我需要进行 DirectShow 开发(因此我需要构建基类,这些基类未随 WSDK 7.0a 版本一起发布).

VS2010 continues to use WSDK 7.0a, which extremely frustrating, as I need to do DirectShow development (so I need to build the baseclasses, which aren't released with 7.0a release of WSDK).

如果我安装 Windows 7.1 SDK 时没有安装 VS2010,那么我假设它没有更新 VS2010 设置是否正确?

Would I be correct in assuming that it's not updating VS2010 settings because VS2010 wasn't installed at the time that I installed Windows 7.1 SDK?

我可以手动修复这个问题,还是应该卸载 Windows 7.1 SDK,然后重新安装?

Can I fix this manually, or should I uninstall Windows 7.1 SDK, then reinstall it?

对此还有其他建议/解决方法吗?

Any other suggestions / workarounds for this?

推荐答案

对于所有使用 Visual Studio 命令提示符 的人,我提到您必须修改 VCVarsQueryRegistry.bat 文件(它被放置在 %VSINSTALLDIR%\Common7\Tools 文件夹(通常是 C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools) 通过修改第 26 行来自

For all those using Visual Studio Command Prompt I mention you have to modify VCVarsQueryRegistry.bat file (it's being called (indirectly) by %VSINSTALLDIR%\VC\vcvarsall.bat) which is placed in %VSINSTALLDIR%\Common7\Tools folder (typicaly C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools) by modifying line 26 from

@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" /v "InstallationFolder"') DO (

@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1" /v "InstallationFolder"') DO (

我希望微软有人解释为什么 WindowsSdkVer.exe 不适用于 VS 2010...

I wish someone from Microsoft explained why WindowsSdkVer.exe doesn't work for VS 2010...

这篇关于切换 VS2010 以使用 Windows 7.1 SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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