Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
676 views
in Technique[技术] by (71.8m points)

visual studio 2010 - Switching VS2010 to use Windows 7.1 SDK

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

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).

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"

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

"C:Program FilesMicrosoft SDKsWindowsv7.1SetupWindowsSdkVer.exe"

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).

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?

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

Any other suggestions / workarounds for this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

@for /F "tokens=1,2*" %%i in ('reg query "%1SOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A" /v "InstallationFolder"') DO (

to

@for /F "tokens=1,2*" %%i in ('reg query "%1SOFTWAREMicrosoftMicrosoft SDKsWindowsv7.1" /v "InstallationFolder"') DO (

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...