views:

33

answers:

2

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

A: 

I am having the same problem. I poked around for a long time. The only solution I could find was to open a Windows SDK commmand prompt and launch VS2010 from there. I would like to know the answer, as well.

Robert Bernstein
A: 

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 2010, but in a different registry location. You want to apply the same edits, but the location is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft SDKs\Windows

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

CurrentInstallFolder
CurrentVersion
ProductVersion

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 v7.0, but none for v7.1) or if it is by design, but everything seems to compile correctly after my changes.

bsruth